{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "no display found. Using non-interactive Agg backend\n",
      "if you use ssh, you can use ssh with -X parmas to avoid this issue\n"
     ]
    }
   ],
   "source": [
    "import QUANTAXIS as QA"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "from QAStrategy import QAStrategyCTABase\n",
    "from QAStrategy.qastockbase import QAStrategyStockBase"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "import random\n",
    "class strategy(QAStrategyStockBase):\n",
    "    def on_bar(self, data):\n",
    "        print(data)\n",
    "\n",
    "        \n",
    "        code = data.name[1]\n",
    "        pos = self.get_positions(code)\n",
    "        print('---------------under is 当前全市场的market_data --------------')\n",
    "        \n",
    "        print(self.get_current_marketdata())\n",
    "        print('---------------under is 当前品种的market_data --------------')\n",
    "        print(self.get_code_marketdata(code))\n",
    "        print(code)\n",
    "        \n",
    "        \n",
    "        \n",
    "        if random.random() > 0.5:\n",
    "            self.send_order('BUY', 'OPEN', code, price=data['close'], volume=1000)\n",
    "        else:\n",
    "            if pos.volume_long > 0:\n",
    "                self.send_order('SELL', 'CLOSE', code, price=data['close'], volume=pos.volume_long)\n",
    "            \n",
    "        print('---------------under is 账户情况和持仓情况 -------------------')\n",
    "        print(self.get_positions(code).message)\n",
    "        print(self.acc.history_table)\n",
    "            \n",
    "        #print(self.running_time)\n",
    "        input()\n",
    "        \n",
    "        \n",
    "        "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "s = strategy(code=['000001', '000002'], frequence='day', start='2019-01-01', end='2019-02-01', strategy_id='x')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      " prortfolio with user_cookie  USER_QoZ8TDrF  already exist!!\n",
      "< QA_AccountPRO x market: stock_cn>\n",
      "stock_cn\n",
      "backtest: Settle!\n",
      "open      9.390000e+00\n",
      "high      9.420000e+00\n",
      "low       9.160000e+00\n",
      "close     9.190000e+00\n",
      "volume    5.393860e+05\n",
      "amount    4.986951e+08\n",
      "Name: (2019-01-02 00:00:00, 000001), dtype: float64\n",
      "---------------under is 当前全市场的market_data --------------\n",
      "                   open  high   low  close    volume       amount\n",
      "2019-01-02 000001  9.39  9.42  9.16   9.19  539386.0  498695104.0\n",
      "---------------under is 当前品种的market_data --------------\n",
      "                   open  high   low  close    volume       amount\n",
      "2019-01-02 000001  9.39  9.42  9.16   9.19  539386.0  498695104.0\n",
      "000001\n",
      "---------------under is 账户情况和持仓情况 -------------------\n",
      "{'code': '000001', 'instrument_id': '000001', 'user_id': 'x', 'portfolio_cookie': 'default', 'username': 'quantaxis', 'position_id': 'd2b24d5c-fb1e-4a2e-97eb-f19b04f544ec', 'account_cookie': 'x', 'frozen': {}, 'name': None, 'spms_id': None, 'oms_id': None, 'market_type': 'stock_cn', 'exchange_id': None, 'moneypreset': 100000, 'moneypresetLeft': 100000, 'lastupdatetime': '', 'volume_long_today': 1000, 'volume_long_his': 0, 'volume_long': 1000, 'volume_short_today': 0, 'volume_short_his': 0, 'volume_short': 0, 'volume_long_frozen_today': 0, 'volume_long_frozen_his': 0, 'volume_long_frozen': 0, 'volume_short_frozen_today': 0, 'volume_short_frozen_his': 0, 'volume_short_frozen': 0, 'margin_long': 9190.0, 'margin_short': 0, 'margin': 9190.0, 'position_price_long': 9.19, 'position_cost_long': 9190.0, 'position_price_short': 0, 'position_cost_short': 0, 'open_price_long': 9.19, 'open_cost_long': 9190.0, 'open_price_short': 0, 'open_cost_short': 0, 'trades': [], 'orders': {}, 'last_price': 9.19, 'float_profit_long': 0.0, 'float_profit_short': 0.0, 'float_profit': 0.0, 'position_profit_long': 0.0, 'position_profit_short': 0.0, 'position_profit': 0.0}\n",
      "              datetime    code  price  amount      cash  \\\n",
      "0  2019-01-02 00:00:00  000001   9.19    1000  990805.0   \n",
      "\n",
      "                               order_id realorder_id trade_id account_cookie  \\\n",
      "0  e23f9e01-e8d2-4a05-93ef-9163ce7a83ee         None     None              x   \n",
      "\n",
      "   commission  tax message  frozen  direction  total_frozen  \n",
      "0           5    0    None       0          1             0  \n"
     ]
    },
    {
     "name": "stdin",
     "output_type": "stream",
     "text": [
      " \n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "open      2.383000e+01\n",
      "high      2.409000e+01\n",
      "low       2.367000e+01\n",
      "close     2.390000e+01\n",
      "volume    2.470100e+05\n",
      "amount    5.893846e+08\n",
      "Name: (2019-01-02 00:00:00, 000002), dtype: float64\n",
      "---------------under is 当前全市场的market_data --------------\n",
      "                    open   high    low  close    volume       amount\n",
      "2019-01-02 000001   9.39   9.42   9.16   9.19  539386.0  498695104.0\n",
      "           000002  23.83  24.09  23.67  23.90  247010.0  589384576.0\n",
      "---------------under is 当前品种的market_data --------------\n",
      "                    open   high    low  close    volume       amount\n",
      "2019-01-02 000002  23.83  24.09  23.67   23.9  247010.0  589384576.0\n",
      "000002\n",
      "---------------under is 账户情况和持仓情况 -------------------\n",
      "{'code': '000002', 'instrument_id': '000002', 'user_id': 'x', 'portfolio_cookie': 'default', 'username': 'quantaxis', 'position_id': '5aa694d0-3861-43a8-9efc-84f380138bea', 'account_cookie': 'x', 'frozen': {}, 'name': None, 'spms_id': None, 'oms_id': None, 'market_type': 'stock_cn', 'exchange_id': None, 'moneypreset': 100000, 'moneypresetLeft': 100000, 'lastupdatetime': '', 'volume_long_today': 1000, 'volume_long_his': 0, 'volume_long': 1000, 'volume_short_today': 0, 'volume_short_his': 0, 'volume_short': 0, 'volume_long_frozen_today': 0, 'volume_long_frozen_his': 0, 'volume_long_frozen': 0, 'volume_short_frozen_today': 0, 'volume_short_frozen_his': 0, 'volume_short_frozen': 0, 'margin_long': 23900.0, 'margin_short': 0, 'margin': 23900.0, 'position_price_long': 23.9, 'position_cost_long': 23900.0, 'position_price_short': 0, 'position_cost_short': 0, 'open_price_long': 23.9, 'open_cost_long': 23900.0, 'open_price_short': 0, 'open_cost_short': 0, 'trades': [], 'orders': {}, 'last_price': 23.9, 'float_profit_long': 0.0, 'float_profit_short': 0.0, 'float_profit': 0.0, 'position_profit_long': 0.0, 'position_profit_short': 0.0, 'position_profit': 0.0}\n",
      "              datetime    code  price  amount        cash  \\\n",
      "0  2019-01-02 00:00:00  000001   9.19    1000  990805.000   \n",
      "1  2019-01-02 00:00:00  000002  23.90    1000  966899.025   \n",
      "\n",
      "                               order_id realorder_id trade_id account_cookie  \\\n",
      "0  e23f9e01-e8d2-4a05-93ef-9163ce7a83ee         None     None              x   \n",
      "1  1f430faa-86d1-440b-abf7-a7feddc17954         None     None              x   \n",
      "\n",
      "   commission  tax message  frozen  direction  total_frozen  \n",
      "0       5.000    0    None       0          1             0  \n",
      "1       5.975    0    None       0          1             0  \n"
     ]
    },
    {
     "name": "stdin",
     "output_type": "stream",
     "text": [
      " \n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "backtest: Settle!\n",
      "open      9.180000e+00\n",
      "high      9.330000e+00\n",
      "low       9.150000e+00\n",
      "close     9.280000e+00\n",
      "volume    4.155370e+05\n",
      "amount    3.844577e+08\n",
      "Name: (2019-01-03 00:00:00, 000001), dtype: float64\n",
      "---------------under is 当前全市场的market_data --------------\n",
      "                   open  high   low  close    volume       amount\n",
      "2019-01-03 000001  9.18  9.33  9.15   9.28  415537.0  384457696.0\n",
      "---------------under is 当前品种的market_data --------------\n",
      "                   open  high   low  close    volume       amount\n",
      "2019-01-02 000001  9.39  9.42  9.16   9.19  539386.0  498695104.0\n",
      "2019-01-03 000001  9.18  9.33  9.15   9.28  415537.0  384457696.0\n",
      "000001\n",
      "---------------under is 账户情况和持仓情况 -------------------\n",
      "{'code': '000001', 'instrument_id': '000001', 'user_id': 'x', 'portfolio_cookie': 'default', 'username': 'quantaxis', 'position_id': 'd2b24d5c-fb1e-4a2e-97eb-f19b04f544ec', 'account_cookie': 'x', 'frozen': {}, 'name': None, 'spms_id': None, 'oms_id': None, 'market_type': 'stock_cn', 'exchange_id': None, 'moneypreset': 100000, 'moneypresetLeft': 100000, 'lastupdatetime': '', 'volume_long_today': 2000, 'volume_long_his': 0, 'volume_long': 2000, 'volume_short_today': 0, 'volume_short_his': 0, 'volume_short': 0, 'volume_long_frozen_today': 0, 'volume_long_frozen_his': 0, 'volume_long_frozen': 0, 'volume_short_frozen_today': 0, 'volume_short_frozen_his': 0, 'volume_short_frozen': 0, 'margin_long': 18470.0, 'margin_short': 0, 'margin': 18470.0, 'position_price_long': 9.235, 'position_cost_long': 18470.0, 'position_price_short': 0, 'position_cost_short': 0, 'open_price_long': 9.235, 'open_cost_long': 18470.0, 'open_price_short': 0, 'open_cost_short': 0, 'trades': [], 'orders': {}, 'last_price': 9.28, 'float_profit_long': 90.0, 'float_profit_short': 0.0, 'float_profit': 90.0, 'position_profit_long': 90.0, 'position_profit_short': 0.0, 'position_profit': 90.0}\n",
      "              datetime    code  price  amount        cash  \\\n",
      "0  2019-01-02 00:00:00  000001   9.19    1000  990805.000   \n",
      "1  2019-01-02 00:00:00  000002  23.90    1000  966899.025   \n",
      "2  2019-01-03 00:00:00  000001   9.28    1000  957614.025   \n",
      "\n",
      "                               order_id realorder_id trade_id account_cookie  \\\n",
      "0  e23f9e01-e8d2-4a05-93ef-9163ce7a83ee         None     None              x   \n",
      "1  1f430faa-86d1-440b-abf7-a7feddc17954         None     None              x   \n",
      "2  0230d608-91cc-422e-8deb-218f4faef3d7         None     None              x   \n",
      "\n",
      "   commission  tax message  frozen  direction  total_frozen  \n",
      "0       5.000    0    None       0          1             0  \n",
      "1       5.975    0    None       0          1             0  \n",
      "2       5.000    0    None       0          1             0  \n"
     ]
    },
    {
     "name": "stdin",
     "output_type": "stream",
     "text": [
      " \n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "open      2.379000e+01\n",
      "high      2.450000e+01\n",
      "low       2.371000e+01\n",
      "close     2.407000e+01\n",
      "volume    2.223530e+05\n",
      "amount    5.363333e+08\n",
      "Name: (2019-01-03 00:00:00, 000002), dtype: float64\n",
      "---------------under is 当前全市场的market_data --------------\n",
      "                    open   high    low  close    volume       amount\n",
      "2019-01-03 000001   9.18   9.33   9.15   9.28  415537.0  384457696.0\n",
      "           000002  23.79  24.50  23.71  24.07  222353.0  536333280.0\n",
      "---------------under is 当前品种的market_data --------------\n",
      "                    open   high    low  close    volume       amount\n",
      "2019-01-02 000002  23.83  24.09  23.67  23.90  247010.0  589384576.0\n",
      "2019-01-03 000002  23.79  24.50  23.71  24.07  222353.0  536333280.0\n",
      "000002\n",
      "---------------under is 账户情况和持仓情况 -------------------\n",
      "{'code': '000002', 'instrument_id': '000002', 'user_id': 'x', 'portfolio_cookie': 'default', 'username': 'quantaxis', 'position_id': '5aa694d0-3861-43a8-9efc-84f380138bea', 'account_cookie': 'x', 'frozen': {}, 'name': None, 'spms_id': None, 'oms_id': None, 'market_type': 'stock_cn', 'exchange_id': None, 'moneypreset': 100000, 'moneypresetLeft': 100000, 'lastupdatetime': '', 'volume_long_today': 1000, 'volume_long_his': 0, 'volume_long': 1000, 'volume_short_today': 0, 'volume_short_his': 0, 'volume_short': 0, 'volume_long_frozen_today': 0, 'volume_long_frozen_his': 0, 'volume_long_frozen': 0, 'volume_short_frozen_today': 0, 'volume_short_frozen_his': 0, 'volume_short_frozen': 0, 'margin_long': 23900.0, 'margin_short': 0, 'margin': 23900.0, 'position_price_long': 23.9, 'position_cost_long': 23900.0, 'position_price_short': 0, 'position_cost_short': 0, 'open_price_long': 23.9, 'open_cost_long': 23900.0, 'open_price_short': 0, 'open_cost_short': 0, 'trades': [], 'orders': {}, 'last_price': 24.07, 'float_profit_long': 170.0, 'float_profit_short': 0.0, 'float_profit': 170.0, 'position_profit_long': 170.0, 'position_profit_short': 0.0, 'position_profit': 170.0}\n",
      "              datetime    code  price  amount         cash  \\\n",
      "0  2019-01-02 00:00:00  000001   9.19    1000  990805.0000   \n",
      "1  2019-01-02 00:00:00  000002  23.90    1000  966899.0250   \n",
      "2  2019-01-03 00:00:00  000001   9.28    1000  957614.0250   \n",
      "3  2019-01-03 00:00:00  000002  24.07   -1000  981653.9375   \n",
      "\n",
      "                               order_id realorder_id trade_id account_cookie  \\\n",
      "0  e23f9e01-e8d2-4a05-93ef-9163ce7a83ee         None     None              x   \n",
      "1  1f430faa-86d1-440b-abf7-a7feddc17954         None     None              x   \n",
      "2  0230d608-91cc-422e-8deb-218f4faef3d7         None     None              x   \n",
      "3  427f1eed-b3bd-4078-94e3-156bf3ae21a6         None     None              x   \n",
      "\n",
      "   commission    tax message  frozen  direction  total_frozen  \n",
      "0      5.0000   0.00    None       0          1             0  \n",
      "1      5.9750   0.00    None       0          1             0  \n",
      "2      5.0000   0.00    None       0          1             0  \n",
      "3      6.0175  24.07    None       0         -1             0  \n"
     ]
    },
    {
     "name": "stdin",
     "output_type": "stream",
     "text": [
      " \n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "backtest: Settle!\n",
      "open      9.240000e+00\n",
      "high      9.820000e+00\n",
      "low       9.220000e+00\n",
      "close     9.750000e+00\n",
      "volume    1.481159e+06\n",
      "amount    1.422150e+09\n",
      "Name: (2019-01-04 00:00:00, 000001), dtype: float64\n",
      "---------------under is 当前全市场的market_data --------------\n",
      "                   open  high   low  close     volume        amount\n",
      "2019-01-04 000001  9.24  9.82  9.22   9.75  1481159.0  1.422150e+09\n",
      "---------------under is 当前品种的market_data --------------\n",
      "                   open  high   low  close     volume        amount\n",
      "2019-01-02 000001  9.39  9.42  9.16   9.19   539386.0  4.986951e+08\n",
      "2019-01-03 000001  9.18  9.33  9.15   9.28   415537.0  3.844577e+08\n",
      "2019-01-04 000001  9.24  9.82  9.22   9.75  1481159.0  1.422150e+09\n",
      "000001\n",
      "---------------under is 账户情况和持仓情况 -------------------\n",
      "{'code': '000001', 'instrument_id': '000001', 'user_id': 'x', 'portfolio_cookie': 'default', 'username': 'quantaxis', 'position_id': 'd2b24d5c-fb1e-4a2e-97eb-f19b04f544ec', 'account_cookie': 'x', 'frozen': {}, 'name': None, 'spms_id': None, 'oms_id': None, 'market_type': 'stock_cn', 'exchange_id': None, 'moneypreset': 100000, 'moneypresetLeft': 100000, 'lastupdatetime': '', 'volume_long_today': 2000, 'volume_long_his': 0, 'volume_long': 2000, 'volume_short_today': 0, 'volume_short_his': 0, 'volume_short': 0, 'volume_long_frozen_today': 0, 'volume_long_frozen_his': 0, 'volume_long_frozen': 0, 'volume_short_frozen_today': 0, 'volume_short_frozen_his': 0, 'volume_short_frozen': 0, 'margin_long': 18470.0, 'margin_short': 0, 'margin': 18470.0, 'position_price_long': 9.235, 'position_cost_long': 18470.0, 'position_price_short': 0, 'position_cost_short': 0, 'open_price_long': 9.235, 'open_cost_long': 18470.0, 'open_price_short': 0, 'open_cost_short': 0, 'trades': [], 'orders': {}, 'last_price': 9.75, 'float_profit_long': 1030.0, 'float_profit_short': 0.0, 'float_profit': 1030.0, 'position_profit_long': 1030.0, 'position_profit_short': 0.0, 'position_profit': 1030.0}\n",
      "              datetime    code  price  amount          cash  \\\n",
      "0  2019-01-02 00:00:00  000001   9.19    1000  9.908050e+05   \n",
      "1  2019-01-02 00:00:00  000002  23.90    1000  9.668990e+05   \n",
      "2  2019-01-03 00:00:00  000001   9.28    1000  9.576140e+05   \n",
      "3  2019-01-03 00:00:00  000002  24.07   -1000  9.816539e+05   \n",
      "4  2019-01-04 00:00:00  000001   9.75   -2000  1.001129e+06   \n",
      "\n",
      "                               order_id realorder_id trade_id account_cookie  \\\n",
      "0  e23f9e01-e8d2-4a05-93ef-9163ce7a83ee         None     None              x   \n",
      "1  1f430faa-86d1-440b-abf7-a7feddc17954         None     None              x   \n",
      "2  0230d608-91cc-422e-8deb-218f4faef3d7         None     None              x   \n",
      "3  427f1eed-b3bd-4078-94e3-156bf3ae21a6         None     None              x   \n",
      "4  48fd88b8-e3c0-4df5-94ef-62b936345bd9         None     None              x   \n",
      "\n",
      "   commission    tax message  frozen  direction  total_frozen  \n",
      "0      5.0000   0.00    None       0          1             0  \n",
      "1      5.9750   0.00    None       0          1             0  \n",
      "2      5.0000   0.00    None       0          1             0  \n",
      "3      6.0175  24.07    None       0         -1             0  \n",
      "4      5.0000  19.50    None       0         -1             0  \n"
     ]
    },
    {
     "name": "stdin",
     "output_type": "stream",
     "text": [
      " \n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "open      2.391000e+01\n",
      "high      2.500000e+01\n",
      "low       2.385000e+01\n",
      "close     2.493000e+01\n",
      "volume    3.777270e+05\n",
      "amount    9.270117e+08\n",
      "Name: (2019-01-04 00:00:00, 000002), dtype: float64\n",
      "---------------under is 当前全市场的market_data --------------\n",
      "                    open   high    low  close     volume        amount\n",
      "2019-01-04 000001   9.24   9.82   9.22   9.75  1481159.0  1.422150e+09\n",
      "           000002  23.91  25.00  23.85  24.93   377727.0  9.270117e+08\n",
      "---------------under is 当前品种的market_data --------------\n",
      "                    open   high    low  close    volume       amount\n",
      "2019-01-02 000002  23.83  24.09  23.67  23.90  247010.0  589384576.0\n",
      "2019-01-03 000002  23.79  24.50  23.71  24.07  222353.0  536333280.0\n",
      "2019-01-04 000002  23.91  25.00  23.85  24.93  377727.0  927011712.0\n",
      "000002\n",
      "---------------under is 账户情况和持仓情况 -------------------\n",
      "{'code': '000002', 'instrument_id': '000002', 'user_id': 'x', 'portfolio_cookie': 'default', 'username': 'quantaxis', 'position_id': '5aa694d0-3861-43a8-9efc-84f380138bea', 'account_cookie': 'x', 'frozen': {}, 'name': None, 'spms_id': None, 'oms_id': None, 'market_type': 'stock_cn', 'exchange_id': None, 'moneypreset': 100000, 'moneypresetLeft': 100000, 'lastupdatetime': '', 'volume_long_today': 2000, 'volume_long_his': 0, 'volume_long': 2000, 'volume_short_today': 0, 'volume_short_his': 0, 'volume_short': 0, 'volume_long_frozen_today': 0, 'volume_long_frozen_his': 0, 'volume_long_frozen': 0, 'volume_short_frozen_today': 0, 'volume_short_frozen_his': 0, 'volume_short_frozen': 0, 'margin_long': 48830.0, 'margin_short': 0, 'margin': 48830.0, 'position_price_long': 24.415, 'position_cost_long': 48830.0, 'position_price_short': 0, 'position_cost_short': 0, 'open_price_long': 24.415, 'open_cost_long': 48830.0, 'open_price_short': 0, 'open_cost_short': 0, 'trades': [], 'orders': {}, 'last_price': 24.93, 'float_profit_long': 1030.0, 'float_profit_short': 0.0, 'float_profit': 1030.0, 'position_profit_long': 1030.0, 'position_profit_short': 0.0, 'position_profit': 1030.0}\n",
      "              datetime    code  price  amount          cash  \\\n",
      "0  2019-01-02 00:00:00  000001   9.19    1000  9.908050e+05   \n",
      "1  2019-01-02 00:00:00  000002  23.90    1000  9.668990e+05   \n",
      "2  2019-01-03 00:00:00  000001   9.28    1000  9.576140e+05   \n",
      "3  2019-01-03 00:00:00  000002  24.07   -1000  9.816539e+05   \n",
      "4  2019-01-04 00:00:00  000001   9.75   -2000  1.001129e+06   \n",
      "5  2019-01-04 00:00:00  000002  24.93    1000  9.761932e+05   \n",
      "\n",
      "                               order_id realorder_id trade_id account_cookie  \\\n",
      "0  e23f9e01-e8d2-4a05-93ef-9163ce7a83ee         None     None              x   \n",
      "1  1f430faa-86d1-440b-abf7-a7feddc17954         None     None              x   \n",
      "2  0230d608-91cc-422e-8deb-218f4faef3d7         None     None              x   \n",
      "3  427f1eed-b3bd-4078-94e3-156bf3ae21a6         None     None              x   \n",
      "4  48fd88b8-e3c0-4df5-94ef-62b936345bd9         None     None              x   \n",
      "5  d9aff179-9bc3-4268-b2d5-37eee8de309f         None     None              x   \n",
      "\n",
      "   commission    tax message  frozen  direction  total_frozen  \n",
      "0      5.0000   0.00    None       0          1             0  \n",
      "1      5.9750   0.00    None       0          1             0  \n",
      "2      5.0000   0.00    None       0          1             0  \n",
      "3      6.0175  24.07    None       0         -1             0  \n",
      "4      5.0000  19.50    None       0         -1             0  \n",
      "5      6.2325   0.00    None       0          1             0  \n"
     ]
    },
    {
     "name": "stdin",
     "output_type": "stream",
     "text": [
      " \n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "backtest: Settle!\n",
      "open      9.840000e+00\n",
      "high      9.850000e+00\n",
      "low       9.630000e+00\n",
      "close     9.740000e+00\n",
      "volume    8.656870e+05\n",
      "amount    8.411664e+08\n",
      "Name: (2019-01-07 00:00:00, 000001), dtype: float64\n",
      "---------------under is 当前全市场的market_data --------------\n",
      "                   open  high   low  close    volume       amount\n",
      "2019-01-07 000001  9.84  9.85  9.63   9.74  865687.0  841166400.0\n",
      "---------------under is 当前品种的market_data --------------\n",
      "                   open  high   low  close     volume        amount\n",
      "2019-01-02 000001  9.39  9.42  9.16   9.19   539386.0  4.986951e+08\n",
      "2019-01-03 000001  9.18  9.33  9.15   9.28   415537.0  3.844577e+08\n",
      "2019-01-04 000001  9.24  9.82  9.22   9.75  1481159.0  1.422150e+09\n",
      "2019-01-07 000001  9.84  9.85  9.63   9.74   865687.0  8.411664e+08\n",
      "000001\n",
      "---------------under is 账户情况和持仓情况 -------------------\n",
      "{'code': '000001', 'instrument_id': '000001', 'user_id': 'x', 'portfolio_cookie': 'default', 'username': 'quantaxis', 'position_id': 'd2b24d5c-fb1e-4a2e-97eb-f19b04f544ec', 'account_cookie': 'x', 'frozen': {}, 'name': None, 'spms_id': None, 'oms_id': None, 'market_type': 'stock_cn', 'exchange_id': None, 'moneypreset': 100000, 'moneypresetLeft': 100000, 'lastupdatetime': '', 'volume_long_today': 3000, 'volume_long_his': 0, 'volume_long': 3000, 'volume_short_today': 0, 'volume_short_his': 0, 'volume_short': 0, 'volume_long_frozen_today': 0, 'volume_long_frozen_his': 0, 'volume_long_frozen': 0, 'volume_short_frozen_today': 0, 'volume_short_frozen_his': 0, 'volume_short_frozen': 0, 'margin_long': 28210.0, 'margin_short': 0, 'margin': 28210.0, 'position_price_long': 9.403333333333334, 'position_cost_long': 28210.0, 'position_price_short': 0, 'position_cost_short': 0, 'open_price_long': 9.403333333333334, 'open_cost_long': 28210.0, 'open_price_short': 0, 'open_cost_short': 0, 'trades': [], 'orders': {}, 'last_price': 9.74, 'float_profit_long': 1010.0, 'float_profit_short': 0.0, 'float_profit': 1010.0, 'position_profit_long': 1010.0, 'position_profit_short': 0.0, 'position_profit': 1010.0}\n",
      "              datetime    code  price  amount          cash  \\\n",
      "0  2019-01-02 00:00:00  000001   9.19    1000  9.908050e+05   \n",
      "1  2019-01-02 00:00:00  000002  23.90    1000  9.668990e+05   \n",
      "2  2019-01-03 00:00:00  000001   9.28    1000  9.576140e+05   \n",
      "3  2019-01-03 00:00:00  000002  24.07   -1000  9.816539e+05   \n",
      "4  2019-01-04 00:00:00  000001   9.75   -2000  1.001129e+06   \n",
      "5  2019-01-04 00:00:00  000002  24.93    1000  9.761932e+05   \n",
      "6  2019-01-07 00:00:00  000001   9.74    1000  9.664482e+05   \n",
      "\n",
      "                               order_id realorder_id trade_id account_cookie  \\\n",
      "0  e23f9e01-e8d2-4a05-93ef-9163ce7a83ee         None     None              x   \n",
      "1  1f430faa-86d1-440b-abf7-a7feddc17954         None     None              x   \n",
      "2  0230d608-91cc-422e-8deb-218f4faef3d7         None     None              x   \n",
      "3  427f1eed-b3bd-4078-94e3-156bf3ae21a6         None     None              x   \n",
      "4  48fd88b8-e3c0-4df5-94ef-62b936345bd9         None     None              x   \n",
      "5  d9aff179-9bc3-4268-b2d5-37eee8de309f         None     None              x   \n",
      "6  41f23955-b920-4f04-bcb7-ca1cd960aa45         None     None              x   \n",
      "\n",
      "   commission    tax message  frozen  direction  total_frozen  \n",
      "0      5.0000   0.00    None       0          1             0  \n",
      "1      5.9750   0.00    None       0          1             0  \n",
      "2      5.0000   0.00    None       0          1             0  \n",
      "3      6.0175  24.07    None       0         -1             0  \n",
      "4      5.0000  19.50    None       0         -1             0  \n",
      "5      6.2325   0.00    None       0          1             0  \n",
      "6      5.0000   0.00    None       0          1             0  \n"
     ]
    },
    {
     "name": "stdin",
     "output_type": "stream",
     "text": [
      " \n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "open      2.529000e+01\n",
      "high      2.553000e+01\n",
      "low       2.499000e+01\n",
      "close     2.505000e+01\n",
      "volume    4.271540e+05\n",
      "amount    1.077909e+09\n",
      "Name: (2019-01-07 00:00:00, 000002), dtype: float64\n",
      "---------------under is 当前全市场的market_data --------------\n",
      "                    open   high    low  close    volume        amount\n",
      "2019-01-07 000001   9.84   9.85   9.63   9.74  865687.0  8.411664e+08\n",
      "           000002  25.29  25.53  24.99  25.05  427154.0  1.077909e+09\n",
      "---------------under is 当前品种的market_data --------------\n",
      "                    open   high    low  close    volume        amount\n",
      "2019-01-02 000002  23.83  24.09  23.67  23.90  247010.0  5.893846e+08\n",
      "2019-01-03 000002  23.79  24.50  23.71  24.07  222353.0  5.363333e+08\n",
      "2019-01-04 000002  23.91  25.00  23.85  24.93  377727.0  9.270117e+08\n",
      "2019-01-07 000002  25.29  25.53  24.99  25.05  427154.0  1.077909e+09\n",
      "000002\n",
      "---------------under is 账户情况和持仓情况 -------------------\n",
      "{'code': '000002', 'instrument_id': '000002', 'user_id': 'x', 'portfolio_cookie': 'default', 'username': 'quantaxis', 'position_id': '5aa694d0-3861-43a8-9efc-84f380138bea', 'account_cookie': 'x', 'frozen': {}, 'name': None, 'spms_id': None, 'oms_id': None, 'market_type': 'stock_cn', 'exchange_id': None, 'moneypreset': 100000, 'moneypresetLeft': 100000, 'lastupdatetime': '', 'volume_long_today': 2000, 'volume_long_his': 0, 'volume_long': 2000, 'volume_short_today': 0, 'volume_short_his': 0, 'volume_short': 0, 'volume_long_frozen_today': 0, 'volume_long_frozen_his': 0, 'volume_long_frozen': 0, 'volume_short_frozen_today': 0, 'volume_short_frozen_his': 0, 'volume_short_frozen': 0, 'margin_long': 48830.0, 'margin_short': 0, 'margin': 48830.0, 'position_price_long': 24.415, 'position_cost_long': 48830.0, 'position_price_short': 0, 'position_cost_short': 0, 'open_price_long': 24.415, 'open_cost_long': 48830.0, 'open_price_short': 0, 'open_cost_short': 0, 'trades': [], 'orders': {}, 'last_price': 25.05, 'float_profit_long': 1270.0, 'float_profit_short': 0.0, 'float_profit': 1270.0, 'position_profit_long': 1270.0, 'position_profit_short': 0.0, 'position_profit': 1270.0}\n",
      "              datetime    code  price  amount          cash  \\\n",
      "0  2019-01-02 00:00:00  000001   9.19    1000  9.908050e+05   \n",
      "1  2019-01-02 00:00:00  000002  23.90    1000  9.668990e+05   \n",
      "2  2019-01-03 00:00:00  000001   9.28    1000  9.576140e+05   \n",
      "3  2019-01-03 00:00:00  000002  24.07   -1000  9.816539e+05   \n",
      "4  2019-01-04 00:00:00  000001   9.75   -2000  1.001129e+06   \n",
      "5  2019-01-04 00:00:00  000002  24.93    1000  9.761932e+05   \n",
      "6  2019-01-07 00:00:00  000001   9.74    1000  9.664482e+05   \n",
      "7  2019-01-07 00:00:00  000002  25.05   -2000  1.016486e+06   \n",
      "\n",
      "                               order_id realorder_id trade_id account_cookie  \\\n",
      "0  e23f9e01-e8d2-4a05-93ef-9163ce7a83ee         None     None              x   \n",
      "1  1f430faa-86d1-440b-abf7-a7feddc17954         None     None              x   \n",
      "2  0230d608-91cc-422e-8deb-218f4faef3d7         None     None              x   \n",
      "3  427f1eed-b3bd-4078-94e3-156bf3ae21a6         None     None              x   \n",
      "4  48fd88b8-e3c0-4df5-94ef-62b936345bd9         None     None              x   \n",
      "5  d9aff179-9bc3-4268-b2d5-37eee8de309f         None     None              x   \n",
      "6  41f23955-b920-4f04-bcb7-ca1cd960aa45         None     None              x   \n",
      "7  cb2fdd74-7326-41d9-812f-9d88da447741         None     None              x   \n",
      "\n",
      "   commission    tax message  frozen  direction  total_frozen  \n",
      "0      5.0000   0.00    None       0          1             0  \n",
      "1      5.9750   0.00    None       0          1             0  \n",
      "2      5.0000   0.00    None       0          1             0  \n",
      "3      6.0175  24.07    None       0         -1             0  \n",
      "4      5.0000  19.50    None       0         -1             0  \n",
      "5      6.2325   0.00    None       0          1             0  \n",
      "6      5.0000   0.00    None       0          1             0  \n",
      "7     12.5250  50.10    None       0         -1             0  \n"
     ]
    },
    {
     "name": "stdin",
     "output_type": "stream",
     "text": [
      " \n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "backtest: Settle!\n",
      "open      9.730000e+00\n",
      "high      9.740000e+00\n",
      "low       9.620000e+00\n",
      "close     9.660000e+00\n",
      "volume    4.023880e+05\n",
      "amount    3.892478e+08\n",
      "Name: (2019-01-08 00:00:00, 000001), dtype: float64\n",
      "---------------under is 当前全市场的market_data --------------\n",
      "                   open  high   low  close    volume       amount\n",
      "2019-01-08 000001  9.73  9.74  9.62   9.66  402388.0  389247808.0\n",
      "---------------under is 当前品种的market_data --------------\n",
      "                   open  high   low  close     volume        amount\n",
      "2019-01-02 000001  9.39  9.42  9.16   9.19   539386.0  4.986951e+08\n",
      "2019-01-03 000001  9.18  9.33  9.15   9.28   415537.0  3.844577e+08\n",
      "2019-01-04 000001  9.24  9.82  9.22   9.75  1481159.0  1.422150e+09\n",
      "2019-01-07 000001  9.84  9.85  9.63   9.74   865687.0  8.411664e+08\n",
      "2019-01-08 000001  9.73  9.74  9.62   9.66   402388.0  3.892478e+08\n",
      "000001\n",
      "---------------under is 账户情况和持仓情况 -------------------\n",
      "{'code': '000001', 'instrument_id': '000001', 'user_id': 'x', 'portfolio_cookie': 'default', 'username': 'quantaxis', 'position_id': 'd2b24d5c-fb1e-4a2e-97eb-f19b04f544ec', 'account_cookie': 'x', 'frozen': {}, 'name': None, 'spms_id': None, 'oms_id': None, 'market_type': 'stock_cn', 'exchange_id': None, 'moneypreset': 100000, 'moneypresetLeft': 100000, 'lastupdatetime': '', 'volume_long_today': 3000, 'volume_long_his': 0, 'volume_long': 3000, 'volume_short_today': 0, 'volume_short_his': 0, 'volume_short': 0, 'volume_long_frozen_today': 0, 'volume_long_frozen_his': 0, 'volume_long_frozen': 0, 'volume_short_frozen_today': 0, 'volume_short_frozen_his': 0, 'volume_short_frozen': 0, 'margin_long': 28210.0, 'margin_short': 0, 'margin': 28210.0, 'position_price_long': 9.403333333333334, 'position_cost_long': 28210.0, 'position_price_short': 0, 'position_cost_short': 0, 'open_price_long': 9.403333333333334, 'open_cost_long': 28210.0, 'open_price_short': 0, 'open_cost_short': 0, 'trades': [], 'orders': {}, 'last_price': 9.66, 'float_profit_long': 770.0, 'float_profit_short': 0.0, 'float_profit': 770.0, 'position_profit_long': 770.0, 'position_profit_short': 0.0, 'position_profit': 770.0}\n",
      "              datetime    code  price  amount          cash  \\\n",
      "0  2019-01-02 00:00:00  000001   9.19    1000  9.908050e+05   \n",
      "1  2019-01-02 00:00:00  000002  23.90    1000  9.668990e+05   \n",
      "2  2019-01-03 00:00:00  000001   9.28    1000  9.576140e+05   \n",
      "3  2019-01-03 00:00:00  000002  24.07   -1000  9.816539e+05   \n",
      "4  2019-01-04 00:00:00  000001   9.75   -2000  1.001129e+06   \n",
      "5  2019-01-04 00:00:00  000002  24.93    1000  9.761932e+05   \n",
      "6  2019-01-07 00:00:00  000001   9.74    1000  9.664482e+05   \n",
      "7  2019-01-07 00:00:00  000002  25.05   -2000  1.016486e+06   \n",
      "8  2019-01-08 00:00:00  000001   9.66   -3000  1.045429e+06   \n",
      "\n",
      "                               order_id realorder_id trade_id account_cookie  \\\n",
      "0  e23f9e01-e8d2-4a05-93ef-9163ce7a83ee         None     None              x   \n",
      "1  1f430faa-86d1-440b-abf7-a7feddc17954         None     None              x   \n",
      "2  0230d608-91cc-422e-8deb-218f4faef3d7         None     None              x   \n",
      "3  427f1eed-b3bd-4078-94e3-156bf3ae21a6         None     None              x   \n",
      "4  48fd88b8-e3c0-4df5-94ef-62b936345bd9         None     None              x   \n",
      "5  d9aff179-9bc3-4268-b2d5-37eee8de309f         None     None              x   \n",
      "6  41f23955-b920-4f04-bcb7-ca1cd960aa45         None     None              x   \n",
      "7  cb2fdd74-7326-41d9-812f-9d88da447741         None     None              x   \n",
      "8  8ef82ee7-87b8-4f7d-8a01-374f52b60cbb         None     None              x   \n",
      "\n",
      "   commission    tax message  frozen  direction  total_frozen  \n",
      "0      5.0000   0.00    None       0          1             0  \n",
      "1      5.9750   0.00    None       0          1             0  \n",
      "2      5.0000   0.00    None       0          1             0  \n",
      "3      6.0175  24.07    None       0         -1             0  \n",
      "4      5.0000  19.50    None       0         -1             0  \n",
      "5      6.2325   0.00    None       0          1             0  \n",
      "6      5.0000   0.00    None       0          1             0  \n",
      "7     12.5250  50.10    None       0         -1             0  \n",
      "8      7.2450  28.98    None       0         -1             0  \n"
     ]
    },
    {
     "name": "stdin",
     "output_type": "stream",
     "text": [
      " \n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "open      2.505000e+01\n",
      "high      2.520000e+01\n",
      "low       2.463000e+01\n",
      "close     2.500000e+01\n",
      "volume    2.143820e+05\n",
      "amount    5.336044e+08\n",
      "Name: (2019-01-08 00:00:00, 000002), dtype: float64\n",
      "---------------under is 当前全市场的market_data --------------\n",
      "                    open   high    low  close    volume       amount\n",
      "2019-01-08 000001   9.73   9.74   9.62   9.66  402388.0  389247808.0\n",
      "           000002  25.05  25.20  24.63  25.00  214382.0  533604352.0\n",
      "---------------under is 当前品种的market_data --------------\n",
      "                    open   high    low  close    volume        amount\n",
      "2019-01-02 000002  23.83  24.09  23.67  23.90  247010.0  5.893846e+08\n",
      "2019-01-03 000002  23.79  24.50  23.71  24.07  222353.0  5.363333e+08\n",
      "2019-01-04 000002  23.91  25.00  23.85  24.93  377727.0  9.270117e+08\n",
      "2019-01-07 000002  25.29  25.53  24.99  25.05  427154.0  1.077909e+09\n",
      "2019-01-08 000002  25.05  25.20  24.63  25.00  214382.0  5.336044e+08\n",
      "000002\n",
      "---------------under is 账户情况和持仓情况 -------------------\n",
      "{'code': '000002', 'instrument_id': '000002', 'user_id': 'x', 'portfolio_cookie': 'default', 'username': 'quantaxis', 'position_id': '5aa694d0-3861-43a8-9efc-84f380138bea', 'account_cookie': 'x', 'frozen': {}, 'name': None, 'spms_id': None, 'oms_id': None, 'market_type': 'stock_cn', 'exchange_id': None, 'moneypreset': 100000, 'moneypresetLeft': 100000, 'lastupdatetime': '', 'volume_long_today': 2000, 'volume_long_his': 0, 'volume_long': 2000, 'volume_short_today': 0, 'volume_short_his': 0, 'volume_short': 0, 'volume_long_frozen_today': 0, 'volume_long_frozen_his': 0, 'volume_long_frozen': 0, 'volume_short_frozen_today': 0, 'volume_short_frozen_his': 0, 'volume_short_frozen': 0, 'margin_long': 48830.0, 'margin_short': 0, 'margin': 48830.0, 'position_price_long': 24.415, 'position_cost_long': 48830.0, 'position_price_short': 0, 'position_cost_short': 0, 'open_price_long': 24.415, 'open_cost_long': 48830.0, 'open_price_short': 0, 'open_cost_short': 0, 'trades': [], 'orders': {}, 'last_price': 25.0, 'float_profit_long': 1170.0, 'float_profit_short': 0.0, 'float_profit': 1170.0, 'position_profit_long': 1170.0, 'position_profit_short': 0.0, 'position_profit': 1170.0}\n",
      "              datetime    code  price  amount          cash  \\\n",
      "0  2019-01-02 00:00:00  000001   9.19    1000  9.908050e+05   \n",
      "1  2019-01-02 00:00:00  000002  23.90    1000  9.668990e+05   \n",
      "2  2019-01-03 00:00:00  000001   9.28    1000  9.576140e+05   \n",
      "3  2019-01-03 00:00:00  000002  24.07   -1000  9.816539e+05   \n",
      "4  2019-01-04 00:00:00  000001   9.75   -2000  1.001129e+06   \n",
      "5  2019-01-04 00:00:00  000002  24.93    1000  9.761932e+05   \n",
      "6  2019-01-07 00:00:00  000001   9.74    1000  9.664482e+05   \n",
      "7  2019-01-07 00:00:00  000002  25.05   -2000  1.016486e+06   \n",
      "8  2019-01-08 00:00:00  000001   9.66   -3000  1.045429e+06   \n",
      "9  2019-01-08 00:00:00  000002  25.00   -2000  1.095367e+06   \n",
      "\n",
      "                               order_id realorder_id trade_id account_cookie  \\\n",
      "0  e23f9e01-e8d2-4a05-93ef-9163ce7a83ee         None     None              x   \n",
      "1  1f430faa-86d1-440b-abf7-a7feddc17954         None     None              x   \n",
      "2  0230d608-91cc-422e-8deb-218f4faef3d7         None     None              x   \n",
      "3  427f1eed-b3bd-4078-94e3-156bf3ae21a6         None     None              x   \n",
      "4  48fd88b8-e3c0-4df5-94ef-62b936345bd9         None     None              x   \n",
      "5  d9aff179-9bc3-4268-b2d5-37eee8de309f         None     None              x   \n",
      "6  41f23955-b920-4f04-bcb7-ca1cd960aa45         None     None              x   \n",
      "7  cb2fdd74-7326-41d9-812f-9d88da447741         None     None              x   \n",
      "8  8ef82ee7-87b8-4f7d-8a01-374f52b60cbb         None     None              x   \n",
      "9  1f63fa52-f56b-4814-8eb3-5e4de849f3cb         None     None              x   \n",
      "\n",
      "   commission    tax message  frozen  direction  total_frozen  \n",
      "0      5.0000   0.00    None       0          1             0  \n",
      "1      5.9750   0.00    None       0          1             0  \n",
      "2      5.0000   0.00    None       0          1             0  \n",
      "3      6.0175  24.07    None       0         -1             0  \n",
      "4      5.0000  19.50    None       0         -1             0  \n",
      "5      6.2325   0.00    None       0          1             0  \n",
      "6      5.0000   0.00    None       0          1             0  \n",
      "7     12.5250  50.10    None       0         -1             0  \n",
      "8      7.2450  28.98    None       0         -1             0  \n",
      "9     12.5000  50.00    None       0         -1             0  \n"
     ]
    },
    {
     "name": "stdin",
     "output_type": "stream",
     "text": [
      " \n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "backtest: Settle!\n",
      "open      9.740000e+00\n",
      "high      1.008000e+01\n",
      "low       9.700000e+00\n",
      "close     9.940000e+00\n",
      "volume    1.233486e+06\n",
      "amount    1.229465e+09\n",
      "Name: (2019-01-09 00:00:00, 000001), dtype: float64\n",
      "---------------under is 当前全市场的market_data --------------\n",
      "                   open   high  low  close     volume        amount\n",
      "2019-01-09 000001  9.74  10.08  9.7   9.94  1233486.0  1.229465e+09\n",
      "---------------under is 当前品种的market_data --------------\n",
      "                   open   high   low  close     volume        amount\n",
      "2019-01-02 000001  9.39   9.42  9.16   9.19   539386.0  4.986951e+08\n",
      "2019-01-03 000001  9.18   9.33  9.15   9.28   415537.0  3.844577e+08\n",
      "2019-01-04 000001  9.24   9.82  9.22   9.75  1481159.0  1.422150e+09\n",
      "2019-01-07 000001  9.84   9.85  9.63   9.74   865687.0  8.411664e+08\n",
      "2019-01-08 000001  9.73   9.74  9.62   9.66   402388.0  3.892478e+08\n",
      "2019-01-09 000001  9.74  10.08  9.70   9.94  1233486.0  1.229465e+09\n",
      "000001\n",
      "---------------under is 账户情况和持仓情况 -------------------\n",
      "{'code': '000001', 'instrument_id': '000001', 'user_id': 'x', 'portfolio_cookie': 'default', 'username': 'quantaxis', 'position_id': 'd2b24d5c-fb1e-4a2e-97eb-f19b04f544ec', 'account_cookie': 'x', 'frozen': {}, 'name': None, 'spms_id': None, 'oms_id': None, 'market_type': 'stock_cn', 'exchange_id': None, 'moneypreset': 100000, 'moneypresetLeft': 100000, 'lastupdatetime': '', 'volume_long_today': 4000, 'volume_long_his': 0, 'volume_long': 4000, 'volume_short_today': 0, 'volume_short_his': 0, 'volume_short': 0, 'volume_long_frozen_today': 0, 'volume_long_frozen_his': 0, 'volume_long_frozen': 0, 'volume_short_frozen_today': 0, 'volume_short_frozen_his': 0, 'volume_short_frozen': 0, 'margin_long': 38150.0, 'margin_short': 0, 'margin': 38150.0, 'position_price_long': 9.5375, 'position_cost_long': 38150.0, 'position_price_short': 0, 'position_cost_short': 0, 'open_price_long': 9.5375, 'open_cost_long': 38150.0, 'open_price_short': 0, 'open_cost_short': 0, 'trades': [], 'orders': {}, 'last_price': 9.94, 'float_profit_long': 1610.0, 'float_profit_short': 0.0, 'float_profit': 1610.0, 'position_profit_long': 1610.0, 'position_profit_short': 0.0, 'position_profit': 1610.0}\n",
      "               datetime    code  price  amount          cash  \\\n",
      "0   2019-01-02 00:00:00  000001   9.19    1000  9.908050e+05   \n",
      "1   2019-01-02 00:00:00  000002  23.90    1000  9.668990e+05   \n",
      "2   2019-01-03 00:00:00  000001   9.28    1000  9.576140e+05   \n",
      "3   2019-01-03 00:00:00  000002  24.07   -1000  9.816539e+05   \n",
      "4   2019-01-04 00:00:00  000001   9.75   -2000  1.001129e+06   \n",
      "5   2019-01-04 00:00:00  000002  24.93    1000  9.761932e+05   \n",
      "6   2019-01-07 00:00:00  000001   9.74    1000  9.664482e+05   \n",
      "7   2019-01-07 00:00:00  000002  25.05   -2000  1.016486e+06   \n",
      "8   2019-01-08 00:00:00  000001   9.66   -3000  1.045429e+06   \n",
      "9   2019-01-08 00:00:00  000002  25.00   -2000  1.095367e+06   \n",
      "10  2019-01-09 00:00:00  000001   9.94    1000  1.085422e+06   \n",
      "\n",
      "                                order_id realorder_id trade_id account_cookie  \\\n",
      "0   e23f9e01-e8d2-4a05-93ef-9163ce7a83ee         None     None              x   \n",
      "1   1f430faa-86d1-440b-abf7-a7feddc17954         None     None              x   \n",
      "2   0230d608-91cc-422e-8deb-218f4faef3d7         None     None              x   \n",
      "3   427f1eed-b3bd-4078-94e3-156bf3ae21a6         None     None              x   \n",
      "4   48fd88b8-e3c0-4df5-94ef-62b936345bd9         None     None              x   \n",
      "5   d9aff179-9bc3-4268-b2d5-37eee8de309f         None     None              x   \n",
      "6   41f23955-b920-4f04-bcb7-ca1cd960aa45         None     None              x   \n",
      "7   cb2fdd74-7326-41d9-812f-9d88da447741         None     None              x   \n",
      "8   8ef82ee7-87b8-4f7d-8a01-374f52b60cbb         None     None              x   \n",
      "9   1f63fa52-f56b-4814-8eb3-5e4de849f3cb         None     None              x   \n",
      "10  13e77d45-9e2c-4ef3-89f5-7fa63cc3b808         None     None              x   \n",
      "\n",
      "    commission    tax message  frozen  direction  total_frozen  \n",
      "0       5.0000   0.00    None       0          1             0  \n",
      "1       5.9750   0.00    None       0          1             0  \n",
      "2       5.0000   0.00    None       0          1             0  \n",
      "3       6.0175  24.07    None       0         -1             0  \n",
      "4       5.0000  19.50    None       0         -1             0  \n",
      "5       6.2325   0.00    None       0          1             0  \n",
      "6       5.0000   0.00    None       0          1             0  \n",
      "7      12.5250  50.10    None       0         -1             0  \n",
      "8       7.2450  28.98    None       0         -1             0  \n",
      "9      12.5000  50.00    None       0         -1             0  \n",
      "10      5.0000   0.00    None       0          1             0  \n"
     ]
    },
    {
     "name": "stdin",
     "output_type": "stream",
     "text": [
      " \n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "open      2.540000e+01\n",
      "high      2.588000e+01\n",
      "low       2.511000e+01\n",
      "close     2.533000e+01\n",
      "volume    3.401400e+05\n",
      "amount    8.670814e+08\n",
      "Name: (2019-01-09 00:00:00, 000002), dtype: float64\n",
      "---------------under is 当前全市场的market_data --------------\n",
      "                    open   high    low  close     volume        amount\n",
      "2019-01-09 000001   9.74  10.08   9.70   9.94  1233486.0  1.229465e+09\n",
      "           000002  25.40  25.88  25.11  25.33   340140.0  8.670814e+08\n",
      "---------------under is 当前品种的market_data --------------\n",
      "                    open   high    low  close    volume        amount\n",
      "2019-01-02 000002  23.83  24.09  23.67  23.90  247010.0  5.893846e+08\n",
      "2019-01-03 000002  23.79  24.50  23.71  24.07  222353.0  5.363333e+08\n",
      "2019-01-04 000002  23.91  25.00  23.85  24.93  377727.0  9.270117e+08\n",
      "2019-01-07 000002  25.29  25.53  24.99  25.05  427154.0  1.077909e+09\n",
      "2019-01-08 000002  25.05  25.20  24.63  25.00  214382.0  5.336044e+08\n",
      "2019-01-09 000002  25.40  25.88  25.11  25.33  340140.0  8.670814e+08\n",
      "000002\n",
      "---------------under is 账户情况和持仓情况 -------------------\n",
      "{'code': '000002', 'instrument_id': '000002', 'user_id': 'x', 'portfolio_cookie': 'default', 'username': 'quantaxis', 'position_id': '5aa694d0-3861-43a8-9efc-84f380138bea', 'account_cookie': 'x', 'frozen': {}, 'name': None, 'spms_id': None, 'oms_id': None, 'market_type': 'stock_cn', 'exchange_id': None, 'moneypreset': 100000, 'moneypresetLeft': 100000, 'lastupdatetime': '', 'volume_long_today': 3000, 'volume_long_his': 0, 'volume_long': 3000, 'volume_short_today': 0, 'volume_short_his': 0, 'volume_short': 0, 'volume_long_frozen_today': 0, 'volume_long_frozen_his': 0, 'volume_long_frozen': 0, 'volume_short_frozen_today': 0, 'volume_short_frozen_his': 0, 'volume_short_frozen': 0, 'margin_long': 74160.0, 'margin_short': 0, 'margin': 74160.0, 'position_price_long': 24.72, 'position_cost_long': 74160.0, 'position_price_short': 0, 'position_cost_short': 0, 'open_price_long': 24.72, 'open_cost_long': 74160.0, 'open_price_short': 0, 'open_cost_short': 0, 'trades': [], 'orders': {}, 'last_price': 25.33, 'float_profit_long': 1830.0, 'float_profit_short': 0.0, 'float_profit': 1830.0, 'position_profit_long': 1830.0, 'position_profit_short': 0.0, 'position_profit': 1830.0}\n",
      "               datetime    code  price  amount          cash  \\\n",
      "0   2019-01-02 00:00:00  000001   9.19    1000  9.908050e+05   \n",
      "1   2019-01-02 00:00:00  000002  23.90    1000  9.668990e+05   \n",
      "2   2019-01-03 00:00:00  000001   9.28    1000  9.576140e+05   \n",
      "3   2019-01-03 00:00:00  000002  24.07   -1000  9.816539e+05   \n",
      "4   2019-01-04 00:00:00  000001   9.75   -2000  1.001129e+06   \n",
      "5   2019-01-04 00:00:00  000002  24.93    1000  9.761932e+05   \n",
      "6   2019-01-07 00:00:00  000001   9.74    1000  9.664482e+05   \n",
      "7   2019-01-07 00:00:00  000002  25.05   -2000  1.016486e+06   \n",
      "8   2019-01-08 00:00:00  000001   9.66   -3000  1.045429e+06   \n",
      "9   2019-01-08 00:00:00  000002  25.00   -2000  1.095367e+06   \n",
      "10  2019-01-09 00:00:00  000001   9.94    1000  1.085422e+06   \n",
      "11  2019-01-09 00:00:00  000002  25.33    1000  1.060086e+06   \n",
      "\n",
      "                                order_id realorder_id trade_id account_cookie  \\\n",
      "0   e23f9e01-e8d2-4a05-93ef-9163ce7a83ee         None     None              x   \n",
      "1   1f430faa-86d1-440b-abf7-a7feddc17954         None     None              x   \n",
      "2   0230d608-91cc-422e-8deb-218f4faef3d7         None     None              x   \n",
      "3   427f1eed-b3bd-4078-94e3-156bf3ae21a6         None     None              x   \n",
      "4   48fd88b8-e3c0-4df5-94ef-62b936345bd9         None     None              x   \n",
      "5   d9aff179-9bc3-4268-b2d5-37eee8de309f         None     None              x   \n",
      "6   41f23955-b920-4f04-bcb7-ca1cd960aa45         None     None              x   \n",
      "7   cb2fdd74-7326-41d9-812f-9d88da447741         None     None              x   \n",
      "8   8ef82ee7-87b8-4f7d-8a01-374f52b60cbb         None     None              x   \n",
      "9   1f63fa52-f56b-4814-8eb3-5e4de849f3cb         None     None              x   \n",
      "10  13e77d45-9e2c-4ef3-89f5-7fa63cc3b808         None     None              x   \n",
      "11  7e714c35-83a4-4cb4-8ab5-d4fb2b31ccb7         None     None              x   \n",
      "\n",
      "    commission    tax message  frozen  direction  total_frozen  \n",
      "0       5.0000   0.00    None       0          1             0  \n",
      "1       5.9750   0.00    None       0          1             0  \n",
      "2       5.0000   0.00    None       0          1             0  \n",
      "3       6.0175  24.07    None       0         -1             0  \n",
      "4       5.0000  19.50    None       0         -1             0  \n",
      "5       6.2325   0.00    None       0          1             0  \n",
      "6       5.0000   0.00    None       0          1             0  \n",
      "7      12.5250  50.10    None       0         -1             0  \n",
      "8       7.2450  28.98    None       0         -1             0  \n",
      "9      12.5000  50.00    None       0         -1             0  \n",
      "10      5.0000   0.00    None       0          1             0  \n",
      "11      6.3325   0.00    None       0          1             0  \n"
     ]
    },
    {
     "name": "stdin",
     "output_type": "stream",
     "text": [
      " \n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "backtest: Settle!\n",
      "open      9.870000e+00\n",
      "high      1.020000e+01\n",
      "low       9.860000e+00\n",
      "close     1.010000e+01\n",
      "volume    1.071817e+06\n",
      "amount    1.079711e+09\n",
      "Name: (2019-01-10 00:00:00, 000001), dtype: float64\n",
      "---------------under is 当前全市场的market_data --------------\n",
      "                   open  high   low  close     volume        amount\n",
      "2019-01-10 000001  9.87  10.2  9.86   10.1  1071817.0  1.079711e+09\n",
      "---------------under is 当前品种的market_data --------------\n",
      "                   open   high   low  close     volume        amount\n",
      "2019-01-02 000001  9.39   9.42  9.16   9.19   539386.0  4.986951e+08\n",
      "2019-01-03 000001  9.18   9.33  9.15   9.28   415537.0  3.844577e+08\n",
      "2019-01-04 000001  9.24   9.82  9.22   9.75  1481159.0  1.422150e+09\n",
      "2019-01-07 000001  9.84   9.85  9.63   9.74   865687.0  8.411664e+08\n",
      "2019-01-08 000001  9.73   9.74  9.62   9.66   402388.0  3.892478e+08\n",
      "2019-01-09 000001  9.74  10.08  9.70   9.94  1233486.0  1.229465e+09\n",
      "2019-01-10 000001  9.87  10.20  9.86  10.10  1071817.0  1.079711e+09\n",
      "000001\n",
      "---------------under is 账户情况和持仓情况 -------------------\n",
      "{'code': '000001', 'instrument_id': '000001', 'user_id': 'x', 'portfolio_cookie': 'default', 'username': 'quantaxis', 'position_id': 'd2b24d5c-fb1e-4a2e-97eb-f19b04f544ec', 'account_cookie': 'x', 'frozen': {}, 'name': None, 'spms_id': None, 'oms_id': None, 'market_type': 'stock_cn', 'exchange_id': None, 'moneypreset': 100000, 'moneypresetLeft': 100000, 'lastupdatetime': '', 'volume_long_today': 5000, 'volume_long_his': 0, 'volume_long': 5000, 'volume_short_today': 0, 'volume_short_his': 0, 'volume_short': 0, 'volume_long_frozen_today': 0, 'volume_long_frozen_his': 0, 'volume_long_frozen': 0, 'volume_short_frozen_today': 0, 'volume_short_frozen_his': 0, 'volume_short_frozen': 0, 'margin_long': 48250.0, 'margin_short': 0, 'margin': 48250.0, 'position_price_long': 9.65, 'position_cost_long': 48250.0, 'position_price_short': 0, 'position_cost_short': 0, 'open_price_long': 9.65, 'open_cost_long': 48250.0, 'open_price_short': 0, 'open_cost_short': 0, 'trades': [], 'orders': {}, 'last_price': 10.1, 'float_profit_long': 2250.0, 'float_profit_short': 0.0, 'float_profit': 2250.0, 'position_profit_long': 2250.0, 'position_profit_short': 0.0, 'position_profit': 2250.0}\n",
      "               datetime    code  price  amount          cash  \\\n",
      "0   2019-01-02 00:00:00  000001   9.19    1000  9.908050e+05   \n",
      "1   2019-01-02 00:00:00  000002  23.90    1000  9.668990e+05   \n",
      "2   2019-01-03 00:00:00  000001   9.28    1000  9.576140e+05   \n",
      "3   2019-01-03 00:00:00  000002  24.07   -1000  9.816539e+05   \n",
      "4   2019-01-04 00:00:00  000001   9.75   -2000  1.001129e+06   \n",
      "5   2019-01-04 00:00:00  000002  24.93    1000  9.761932e+05   \n",
      "6   2019-01-07 00:00:00  000001   9.74    1000  9.664482e+05   \n",
      "7   2019-01-07 00:00:00  000002  25.05   -2000  1.016486e+06   \n",
      "8   2019-01-08 00:00:00  000001   9.66   -3000  1.045429e+06   \n",
      "9   2019-01-08 00:00:00  000002  25.00   -2000  1.095367e+06   \n",
      "10  2019-01-09 00:00:00  000001   9.94    1000  1.085422e+06   \n",
      "11  2019-01-09 00:00:00  000002  25.33    1000  1.060086e+06   \n",
      "12  2019-01-10 00:00:00  000001  10.10    1000  1.049981e+06   \n",
      "\n",
      "                                order_id realorder_id trade_id account_cookie  \\\n",
      "0   e23f9e01-e8d2-4a05-93ef-9163ce7a83ee         None     None              x   \n",
      "1   1f430faa-86d1-440b-abf7-a7feddc17954         None     None              x   \n",
      "2   0230d608-91cc-422e-8deb-218f4faef3d7         None     None              x   \n",
      "3   427f1eed-b3bd-4078-94e3-156bf3ae21a6         None     None              x   \n",
      "4   48fd88b8-e3c0-4df5-94ef-62b936345bd9         None     None              x   \n",
      "5   d9aff179-9bc3-4268-b2d5-37eee8de309f         None     None              x   \n",
      "6   41f23955-b920-4f04-bcb7-ca1cd960aa45         None     None              x   \n",
      "7   cb2fdd74-7326-41d9-812f-9d88da447741         None     None              x   \n",
      "8   8ef82ee7-87b8-4f7d-8a01-374f52b60cbb         None     None              x   \n",
      "9   1f63fa52-f56b-4814-8eb3-5e4de849f3cb         None     None              x   \n",
      "10  13e77d45-9e2c-4ef3-89f5-7fa63cc3b808         None     None              x   \n",
      "11  7e714c35-83a4-4cb4-8ab5-d4fb2b31ccb7         None     None              x   \n",
      "12  380f932e-7871-4c72-94d3-5077861c9f53         None     None              x   \n",
      "\n",
      "    commission    tax message  frozen  direction  total_frozen  \n",
      "0       5.0000   0.00    None       0          1             0  \n",
      "1       5.9750   0.00    None       0          1             0  \n",
      "2       5.0000   0.00    None       0          1             0  \n",
      "3       6.0175  24.07    None       0         -1             0  \n",
      "4       5.0000  19.50    None       0         -1             0  \n",
      "5       6.2325   0.00    None       0          1             0  \n",
      "6       5.0000   0.00    None       0          1             0  \n",
      "7      12.5250  50.10    None       0         -1             0  \n",
      "8       7.2450  28.98    None       0         -1             0  \n",
      "9      12.5000  50.00    None       0         -1             0  \n",
      "10      5.0000   0.00    None       0          1             0  \n",
      "11      6.3325   0.00    None       0          1             0  \n",
      "12      5.0000   0.00    None       0          1             0  \n"
     ]
    },
    {
     "name": "stdin",
     "output_type": "stream",
     "text": [
      " \n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "open      2.522000e+01\n",
      "high      2.556000e+01\n",
      "low       2.503000e+01\n",
      "close     2.511000e+01\n",
      "volume    2.246490e+05\n",
      "amount    5.689526e+08\n",
      "Name: (2019-01-10 00:00:00, 000002), dtype: float64\n",
      "---------------under is 当前全市场的market_data --------------\n",
      "                    open   high    low  close     volume        amount\n",
      "2019-01-10 000001   9.87  10.20   9.86  10.10  1071817.0  1.079711e+09\n",
      "           000002  25.22  25.56  25.03  25.11   224649.0  5.689526e+08\n",
      "---------------under is 当前品种的market_data --------------\n",
      "                    open   high    low  close    volume        amount\n",
      "2019-01-02 000002  23.83  24.09  23.67  23.90  247010.0  5.893846e+08\n",
      "2019-01-03 000002  23.79  24.50  23.71  24.07  222353.0  5.363333e+08\n",
      "2019-01-04 000002  23.91  25.00  23.85  24.93  377727.0  9.270117e+08\n",
      "2019-01-07 000002  25.29  25.53  24.99  25.05  427154.0  1.077909e+09\n",
      "2019-01-08 000002  25.05  25.20  24.63  25.00  214382.0  5.336044e+08\n",
      "2019-01-09 000002  25.40  25.88  25.11  25.33  340140.0  8.670814e+08\n",
      "2019-01-10 000002  25.22  25.56  25.03  25.11  224649.0  5.689526e+08\n",
      "000002\n",
      "---------------under is 账户情况和持仓情况 -------------------\n",
      "{'code': '000002', 'instrument_id': '000002', 'user_id': 'x', 'portfolio_cookie': 'default', 'username': 'quantaxis', 'position_id': '5aa694d0-3861-43a8-9efc-84f380138bea', 'account_cookie': 'x', 'frozen': {}, 'name': None, 'spms_id': None, 'oms_id': None, 'market_type': 'stock_cn', 'exchange_id': None, 'moneypreset': 100000, 'moneypresetLeft': 100000, 'lastupdatetime': '', 'volume_long_today': 4000, 'volume_long_his': 0, 'volume_long': 4000, 'volume_short_today': 0, 'volume_short_his': 0, 'volume_short': 0, 'volume_long_frozen_today': 0, 'volume_long_frozen_his': 0, 'volume_long_frozen': 0, 'volume_short_frozen_today': 0, 'volume_short_frozen_his': 0, 'volume_short_frozen': 0, 'margin_long': 99270.0, 'margin_short': 0, 'margin': 99270.0, 'position_price_long': 24.8175, 'position_cost_long': 99270.0, 'position_price_short': 0, 'position_cost_short': 0, 'open_price_long': 24.8175, 'open_cost_long': 99270.0, 'open_price_short': 0, 'open_cost_short': 0, 'trades': [], 'orders': {}, 'last_price': 25.11, 'float_profit_long': 1170.0, 'float_profit_short': 0.0, 'float_profit': 1170.0, 'position_profit_long': 1170.0, 'position_profit_short': 0.0, 'position_profit': 1170.0}\n",
      "               datetime    code  price  amount          cash  \\\n",
      "0   2019-01-02 00:00:00  000001   9.19    1000  9.908050e+05   \n",
      "1   2019-01-02 00:00:00  000002  23.90    1000  9.668990e+05   \n",
      "2   2019-01-03 00:00:00  000001   9.28    1000  9.576140e+05   \n",
      "3   2019-01-03 00:00:00  000002  24.07   -1000  9.816539e+05   \n",
      "4   2019-01-04 00:00:00  000001   9.75   -2000  1.001129e+06   \n",
      "5   2019-01-04 00:00:00  000002  24.93    1000  9.761932e+05   \n",
      "6   2019-01-07 00:00:00  000001   9.74    1000  9.664482e+05   \n",
      "7   2019-01-07 00:00:00  000002  25.05   -2000  1.016486e+06   \n",
      "8   2019-01-08 00:00:00  000001   9.66   -3000  1.045429e+06   \n",
      "9   2019-01-08 00:00:00  000002  25.00   -2000  1.095367e+06   \n",
      "10  2019-01-09 00:00:00  000001   9.94    1000  1.085422e+06   \n",
      "11  2019-01-09 00:00:00  000002  25.33    1000  1.060086e+06   \n",
      "12  2019-01-10 00:00:00  000001  10.10    1000  1.049981e+06   \n",
      "13  2019-01-10 00:00:00  000002  25.11    1000  1.024864e+06   \n",
      "\n",
      "                                order_id realorder_id trade_id account_cookie  \\\n",
      "0   e23f9e01-e8d2-4a05-93ef-9163ce7a83ee         None     None              x   \n",
      "1   1f430faa-86d1-440b-abf7-a7feddc17954         None     None              x   \n",
      "2   0230d608-91cc-422e-8deb-218f4faef3d7         None     None              x   \n",
      "3   427f1eed-b3bd-4078-94e3-156bf3ae21a6         None     None              x   \n",
      "4   48fd88b8-e3c0-4df5-94ef-62b936345bd9         None     None              x   \n",
      "5   d9aff179-9bc3-4268-b2d5-37eee8de309f         None     None              x   \n",
      "6   41f23955-b920-4f04-bcb7-ca1cd960aa45         None     None              x   \n",
      "7   cb2fdd74-7326-41d9-812f-9d88da447741         None     None              x   \n",
      "8   8ef82ee7-87b8-4f7d-8a01-374f52b60cbb         None     None              x   \n",
      "9   1f63fa52-f56b-4814-8eb3-5e4de849f3cb         None     None              x   \n",
      "10  13e77d45-9e2c-4ef3-89f5-7fa63cc3b808         None     None              x   \n",
      "11  7e714c35-83a4-4cb4-8ab5-d4fb2b31ccb7         None     None              x   \n",
      "12  380f932e-7871-4c72-94d3-5077861c9f53         None     None              x   \n",
      "13  3966e418-9017-4565-b24f-ed9455ef5593         None     None              x   \n",
      "\n",
      "    commission    tax message  frozen  direction  total_frozen  \n",
      "0       5.0000   0.00    None       0          1             0  \n",
      "1       5.9750   0.00    None       0          1             0  \n",
      "2       5.0000   0.00    None       0          1             0  \n",
      "3       6.0175  24.07    None       0         -1             0  \n",
      "4       5.0000  19.50    None       0         -1             0  \n",
      "5       6.2325   0.00    None       0          1             0  \n",
      "6       5.0000   0.00    None       0          1             0  \n",
      "7      12.5250  50.10    None       0         -1             0  \n",
      "8       7.2450  28.98    None       0         -1             0  \n",
      "9      12.5000  50.00    None       0         -1             0  \n",
      "10      5.0000   0.00    None       0          1             0  \n",
      "11      6.3325   0.00    None       0          1             0  \n",
      "12      5.0000   0.00    None       0          1             0  \n",
      "13      6.2775   0.00    None       0          1             0  \n"
     ]
    },
    {
     "name": "stdin",
     "output_type": "stream",
     "text": [
      " \n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "backtest: Settle!\n",
      "open      1.011000e+01\n",
      "high      1.022000e+01\n",
      "low       1.005000e+01\n",
      "close     1.020000e+01\n",
      "volume    6.963640e+05\n",
      "amount    7.080018e+08\n",
      "Name: (2019-01-11 00:00:00, 000001), dtype: float64\n",
      "---------------under is 当前全市场的market_data --------------\n",
      "                    open   high    low  close    volume       amount\n",
      "2019-01-11 000001  10.11  10.22  10.05   10.2  696364.0  708001792.0\n",
      "---------------under is 当前品种的market_data --------------\n",
      "                    open   high    low  close     volume        amount\n",
      "2019-01-02 000001   9.39   9.42   9.16   9.19   539386.0  4.986951e+08\n",
      "2019-01-03 000001   9.18   9.33   9.15   9.28   415537.0  3.844577e+08\n",
      "2019-01-04 000001   9.24   9.82   9.22   9.75  1481159.0  1.422150e+09\n",
      "2019-01-07 000001   9.84   9.85   9.63   9.74   865687.0  8.411664e+08\n",
      "2019-01-08 000001   9.73   9.74   9.62   9.66   402388.0  3.892478e+08\n",
      "2019-01-09 000001   9.74  10.08   9.70   9.94  1233486.0  1.229465e+09\n",
      "2019-01-10 000001   9.87  10.20   9.86  10.10  1071817.0  1.079711e+09\n",
      "2019-01-11 000001  10.11  10.22  10.05  10.20   696364.0  7.080018e+08\n",
      "000001\n",
      "---------------under is 账户情况和持仓情况 -------------------\n",
      "{'code': '000001', 'instrument_id': '000001', 'user_id': 'x', 'portfolio_cookie': 'default', 'username': 'quantaxis', 'position_id': 'd2b24d5c-fb1e-4a2e-97eb-f19b04f544ec', 'account_cookie': 'x', 'frozen': {}, 'name': None, 'spms_id': None, 'oms_id': None, 'market_type': 'stock_cn', 'exchange_id': None, 'moneypreset': 100000, 'moneypresetLeft': 100000, 'lastupdatetime': '', 'volume_long_today': 6000, 'volume_long_his': 0, 'volume_long': 6000, 'volume_short_today': 0, 'volume_short_his': 0, 'volume_short': 0, 'volume_long_frozen_today': 0, 'volume_long_frozen_his': 0, 'volume_long_frozen': 0, 'volume_short_frozen_today': 0, 'volume_short_frozen_his': 0, 'volume_short_frozen': 0, 'margin_long': 58450.0, 'margin_short': 0, 'margin': 58450.0, 'position_price_long': 9.741666666666667, 'position_cost_long': 58450.0, 'position_price_short': 0, 'position_cost_short': 0, 'open_price_long': 9.741666666666667, 'open_cost_long': 58450.0, 'open_price_short': 0, 'open_cost_short': 0, 'trades': [], 'orders': {}, 'last_price': 10.2, 'float_profit_long': 2749.9999999999927, 'float_profit_short': 0.0, 'float_profit': 2749.9999999999927, 'position_profit_long': 2749.9999999999927, 'position_profit_short': 0.0, 'position_profit': 2749.9999999999927}\n",
      "               datetime    code  price  amount          cash  \\\n",
      "0   2019-01-02 00:00:00  000001   9.19    1000  9.908050e+05   \n",
      "1   2019-01-02 00:00:00  000002  23.90    1000  9.668990e+05   \n",
      "2   2019-01-03 00:00:00  000001   9.28    1000  9.576140e+05   \n",
      "3   2019-01-03 00:00:00  000002  24.07   -1000  9.816539e+05   \n",
      "4   2019-01-04 00:00:00  000001   9.75   -2000  1.001129e+06   \n",
      "5   2019-01-04 00:00:00  000002  24.93    1000  9.761932e+05   \n",
      "6   2019-01-07 00:00:00  000001   9.74    1000  9.664482e+05   \n",
      "7   2019-01-07 00:00:00  000002  25.05   -2000  1.016486e+06   \n",
      "8   2019-01-08 00:00:00  000001   9.66   -3000  1.045429e+06   \n",
      "9   2019-01-08 00:00:00  000002  25.00   -2000  1.095367e+06   \n",
      "10  2019-01-09 00:00:00  000001   9.94    1000  1.085422e+06   \n",
      "11  2019-01-09 00:00:00  000002  25.33    1000  1.060086e+06   \n",
      "12  2019-01-10 00:00:00  000001  10.10    1000  1.049981e+06   \n",
      "13  2019-01-10 00:00:00  000002  25.11    1000  1.024864e+06   \n",
      "14  2019-01-11 00:00:00  000001  10.20    1000  1.014659e+06   \n",
      "\n",
      "                                order_id realorder_id trade_id account_cookie  \\\n",
      "0   e23f9e01-e8d2-4a05-93ef-9163ce7a83ee         None     None              x   \n",
      "1   1f430faa-86d1-440b-abf7-a7feddc17954         None     None              x   \n",
      "2   0230d608-91cc-422e-8deb-218f4faef3d7         None     None              x   \n",
      "3   427f1eed-b3bd-4078-94e3-156bf3ae21a6         None     None              x   \n",
      "4   48fd88b8-e3c0-4df5-94ef-62b936345bd9         None     None              x   \n",
      "5   d9aff179-9bc3-4268-b2d5-37eee8de309f         None     None              x   \n",
      "6   41f23955-b920-4f04-bcb7-ca1cd960aa45         None     None              x   \n",
      "7   cb2fdd74-7326-41d9-812f-9d88da447741         None     None              x   \n",
      "8   8ef82ee7-87b8-4f7d-8a01-374f52b60cbb         None     None              x   \n",
      "9   1f63fa52-f56b-4814-8eb3-5e4de849f3cb         None     None              x   \n",
      "10  13e77d45-9e2c-4ef3-89f5-7fa63cc3b808         None     None              x   \n",
      "11  7e714c35-83a4-4cb4-8ab5-d4fb2b31ccb7         None     None              x   \n",
      "12  380f932e-7871-4c72-94d3-5077861c9f53         None     None              x   \n",
      "13  3966e418-9017-4565-b24f-ed9455ef5593         None     None              x   \n",
      "14  99048106-f032-45a2-92c6-5a076f899a8a         None     None              x   \n",
      "\n",
      "    commission    tax message  frozen  direction  total_frozen  \n",
      "0       5.0000   0.00    None       0          1             0  \n",
      "1       5.9750   0.00    None       0          1             0  \n",
      "2       5.0000   0.00    None       0          1             0  \n",
      "3       6.0175  24.07    None       0         -1             0  \n",
      "4       5.0000  19.50    None       0         -1             0  \n",
      "5       6.2325   0.00    None       0          1             0  \n",
      "6       5.0000   0.00    None       0          1             0  \n",
      "7      12.5250  50.10    None       0         -1             0  \n",
      "8       7.2450  28.98    None       0         -1             0  \n",
      "9      12.5000  50.00    None       0         -1             0  \n",
      "10      5.0000   0.00    None       0          1             0  \n",
      "11      6.3325   0.00    None       0          1             0  \n",
      "12      5.0000   0.00    None       0          1             0  \n",
      "13      6.2775   0.00    None       0          1             0  \n",
      "14      5.0000   0.00    None       0          1             0  \n"
     ]
    },
    {
     "name": "stdin",
     "output_type": "stream",
     "text": [
      " \n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "open      2.510000e+01\n",
      "high      2.554000e+01\n",
      "low       2.501000e+01\n",
      "close     2.530000e+01\n",
      "volume    2.406940e+05\n",
      "amount    6.069947e+08\n",
      "Name: (2019-01-11 00:00:00, 000002), dtype: float64\n",
      "---------------under is 当前全市场的market_data --------------\n",
      "                    open   high    low  close    volume       amount\n",
      "2019-01-11 000001  10.11  10.22  10.05   10.2  696364.0  708001792.0\n",
      "           000002  25.10  25.54  25.01   25.3  240694.0  606994688.0\n",
      "---------------under is 当前品种的market_data --------------\n",
      "                    open   high    low  close    volume        amount\n",
      "2019-01-02 000002  23.83  24.09  23.67  23.90  247010.0  5.893846e+08\n",
      "2019-01-03 000002  23.79  24.50  23.71  24.07  222353.0  5.363333e+08\n",
      "2019-01-04 000002  23.91  25.00  23.85  24.93  377727.0  9.270117e+08\n",
      "2019-01-07 000002  25.29  25.53  24.99  25.05  427154.0  1.077909e+09\n",
      "2019-01-08 000002  25.05  25.20  24.63  25.00  214382.0  5.336044e+08\n",
      "2019-01-09 000002  25.40  25.88  25.11  25.33  340140.0  8.670814e+08\n",
      "2019-01-10 000002  25.22  25.56  25.03  25.11  224649.0  5.689526e+08\n",
      "2019-01-11 000002  25.10  25.54  25.01  25.30  240694.0  6.069947e+08\n",
      "000002\n",
      "---------------under is 账户情况和持仓情况 -------------------\n",
      "{'code': '000002', 'instrument_id': '000002', 'user_id': 'x', 'portfolio_cookie': 'default', 'username': 'quantaxis', 'position_id': '5aa694d0-3861-43a8-9efc-84f380138bea', 'account_cookie': 'x', 'frozen': {}, 'name': None, 'spms_id': None, 'oms_id': None, 'market_type': 'stock_cn', 'exchange_id': None, 'moneypreset': 100000, 'moneypresetLeft': 100000, 'lastupdatetime': '', 'volume_long_today': 4000, 'volume_long_his': 0, 'volume_long': 4000, 'volume_short_today': 0, 'volume_short_his': 0, 'volume_short': 0, 'volume_long_frozen_today': 0, 'volume_long_frozen_his': 0, 'volume_long_frozen': 0, 'volume_short_frozen_today': 0, 'volume_short_frozen_his': 0, 'volume_short_frozen': 0, 'margin_long': 99270.0, 'margin_short': 0, 'margin': 99270.0, 'position_price_long': 24.8175, 'position_cost_long': 99270.0, 'position_price_short': 0, 'position_cost_short': 0, 'open_price_long': 24.8175, 'open_cost_long': 99270.0, 'open_price_short': 0, 'open_cost_short': 0, 'trades': [], 'orders': {}, 'last_price': 25.3, 'float_profit_long': 1930.0, 'float_profit_short': 0.0, 'float_profit': 1930.0, 'position_profit_long': 1930.0, 'position_profit_short': 0.0, 'position_profit': 1930.0}\n",
      "               datetime    code  price  amount          cash  \\\n",
      "0   2019-01-02 00:00:00  000001   9.19    1000  9.908050e+05   \n",
      "1   2019-01-02 00:00:00  000002  23.90    1000  9.668990e+05   \n",
      "2   2019-01-03 00:00:00  000001   9.28    1000  9.576140e+05   \n",
      "3   2019-01-03 00:00:00  000002  24.07   -1000  9.816539e+05   \n",
      "4   2019-01-04 00:00:00  000001   9.75   -2000  1.001129e+06   \n",
      "5   2019-01-04 00:00:00  000002  24.93    1000  9.761932e+05   \n",
      "6   2019-01-07 00:00:00  000001   9.74    1000  9.664482e+05   \n",
      "7   2019-01-07 00:00:00  000002  25.05   -2000  1.016486e+06   \n",
      "8   2019-01-08 00:00:00  000001   9.66   -3000  1.045429e+06   \n",
      "9   2019-01-08 00:00:00  000002  25.00   -2000  1.095367e+06   \n",
      "10  2019-01-09 00:00:00  000001   9.94    1000  1.085422e+06   \n",
      "11  2019-01-09 00:00:00  000002  25.33    1000  1.060086e+06   \n",
      "12  2019-01-10 00:00:00  000001  10.10    1000  1.049981e+06   \n",
      "13  2019-01-10 00:00:00  000002  25.11    1000  1.024864e+06   \n",
      "14  2019-01-11 00:00:00  000001  10.20    1000  1.014659e+06   \n",
      "15  2019-01-11 00:00:00  000002  25.30   -4000  1.115733e+06   \n",
      "\n",
      "                                order_id realorder_id trade_id account_cookie  \\\n",
      "0   e23f9e01-e8d2-4a05-93ef-9163ce7a83ee         None     None              x   \n",
      "1   1f430faa-86d1-440b-abf7-a7feddc17954         None     None              x   \n",
      "2   0230d608-91cc-422e-8deb-218f4faef3d7         None     None              x   \n",
      "3   427f1eed-b3bd-4078-94e3-156bf3ae21a6         None     None              x   \n",
      "4   48fd88b8-e3c0-4df5-94ef-62b936345bd9         None     None              x   \n",
      "5   d9aff179-9bc3-4268-b2d5-37eee8de309f         None     None              x   \n",
      "6   41f23955-b920-4f04-bcb7-ca1cd960aa45         None     None              x   \n",
      "7   cb2fdd74-7326-41d9-812f-9d88da447741         None     None              x   \n",
      "8   8ef82ee7-87b8-4f7d-8a01-374f52b60cbb         None     None              x   \n",
      "9   1f63fa52-f56b-4814-8eb3-5e4de849f3cb         None     None              x   \n",
      "10  13e77d45-9e2c-4ef3-89f5-7fa63cc3b808         None     None              x   \n",
      "11  7e714c35-83a4-4cb4-8ab5-d4fb2b31ccb7         None     None              x   \n",
      "12  380f932e-7871-4c72-94d3-5077861c9f53         None     None              x   \n",
      "13  3966e418-9017-4565-b24f-ed9455ef5593         None     None              x   \n",
      "14  99048106-f032-45a2-92c6-5a076f899a8a         None     None              x   \n",
      "15  3529f52a-3c09-46fc-944d-b3c619af7cd7         None     None              x   \n",
      "\n",
      "    commission     tax message  frozen  direction  total_frozen  \n",
      "0       5.0000    0.00    None       0          1             0  \n",
      "1       5.9750    0.00    None       0          1             0  \n",
      "2       5.0000    0.00    None       0          1             0  \n",
      "3       6.0175   24.07    None       0         -1             0  \n",
      "4       5.0000   19.50    None       0         -1             0  \n",
      "5       6.2325    0.00    None       0          1             0  \n",
      "6       5.0000    0.00    None       0          1             0  \n",
      "7      12.5250   50.10    None       0         -1             0  \n",
      "8       7.2450   28.98    None       0         -1             0  \n",
      "9      12.5000   50.00    None       0         -1             0  \n",
      "10      5.0000    0.00    None       0          1             0  \n",
      "11      6.3325    0.00    None       0          1             0  \n",
      "12      5.0000    0.00    None       0          1             0  \n",
      "13      6.2775    0.00    None       0          1             0  \n",
      "14      5.0000    0.00    None       0          1             0  \n",
      "15     25.3000  101.20    None       0         -1             0  \n"
     ]
    },
    {
     "name": "stdin",
     "output_type": "stream",
     "text": [
      " \n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "backtest: Settle!\n",
      "open      1.022000e+01\n",
      "high      1.025000e+01\n",
      "low       1.007000e+01\n",
      "close     1.011000e+01\n",
      "volume    5.004430e+05\n",
      "amount    5.078629e+08\n",
      "Name: (2019-01-14 00:00:00, 000001), dtype: float64\n",
      "---------------under is 当前全市场的market_data --------------\n",
      "                    open   high    low  close    volume       amount\n",
      "2019-01-14 000001  10.22  10.25  10.07  10.11  500443.0  507862880.0\n",
      "---------------under is 当前品种的market_data --------------\n",
      "                    open   high    low  close     volume        amount\n",
      "2019-01-02 000001   9.39   9.42   9.16   9.19   539386.0  4.986951e+08\n",
      "2019-01-03 000001   9.18   9.33   9.15   9.28   415537.0  3.844577e+08\n",
      "2019-01-04 000001   9.24   9.82   9.22   9.75  1481159.0  1.422150e+09\n",
      "2019-01-07 000001   9.84   9.85   9.63   9.74   865687.0  8.411664e+08\n",
      "2019-01-08 000001   9.73   9.74   9.62   9.66   402388.0  3.892478e+08\n",
      "2019-01-09 000001   9.74  10.08   9.70   9.94  1233486.0  1.229465e+09\n",
      "2019-01-10 000001   9.87  10.20   9.86  10.10  1071817.0  1.079711e+09\n",
      "2019-01-11 000001  10.11  10.22  10.05  10.20   696364.0  7.080018e+08\n",
      "2019-01-14 000001  10.22  10.25  10.07  10.11   500443.0  5.078629e+08\n",
      "000001\n",
      "---------------under is 账户情况和持仓情况 -------------------\n",
      "{'code': '000001', 'instrument_id': '000001', 'user_id': 'x', 'portfolio_cookie': 'default', 'username': 'quantaxis', 'position_id': 'd2b24d5c-fb1e-4a2e-97eb-f19b04f544ec', 'account_cookie': 'x', 'frozen': {}, 'name': None, 'spms_id': None, 'oms_id': None, 'market_type': 'stock_cn', 'exchange_id': None, 'moneypreset': 100000, 'moneypresetLeft': 100000, 'lastupdatetime': '', 'volume_long_today': 6000, 'volume_long_his': 0, 'volume_long': 6000, 'volume_short_today': 0, 'volume_short_his': 0, 'volume_short': 0, 'volume_long_frozen_today': 0, 'volume_long_frozen_his': 0, 'volume_long_frozen': 0, 'volume_short_frozen_today': 0, 'volume_short_frozen_his': 0, 'volume_short_frozen': 0, 'margin_long': 58450.0, 'margin_short': 0, 'margin': 58450.0, 'position_price_long': 9.741666666666667, 'position_cost_long': 58450.0, 'position_price_short': 0, 'position_cost_short': 0, 'open_price_long': 9.741666666666667, 'open_cost_long': 58450.0, 'open_price_short': 0, 'open_cost_short': 0, 'trades': [], 'orders': {}, 'last_price': 10.11, 'float_profit_long': 2210.0, 'float_profit_short': 0.0, 'float_profit': 2210.0, 'position_profit_long': 2210.0, 'position_profit_short': 0.0, 'position_profit': 2210.0}\n",
      "               datetime    code  price  amount          cash  \\\n",
      "0   2019-01-02 00:00:00  000001   9.19    1000  9.908050e+05   \n",
      "1   2019-01-02 00:00:00  000002  23.90    1000  9.668990e+05   \n",
      "2   2019-01-03 00:00:00  000001   9.28    1000  9.576140e+05   \n",
      "3   2019-01-03 00:00:00  000002  24.07   -1000  9.816539e+05   \n",
      "4   2019-01-04 00:00:00  000001   9.75   -2000  1.001129e+06   \n",
      "5   2019-01-04 00:00:00  000002  24.93    1000  9.761932e+05   \n",
      "6   2019-01-07 00:00:00  000001   9.74    1000  9.664482e+05   \n",
      "7   2019-01-07 00:00:00  000002  25.05   -2000  1.016486e+06   \n",
      "8   2019-01-08 00:00:00  000001   9.66   -3000  1.045429e+06   \n",
      "9   2019-01-08 00:00:00  000002  25.00   -2000  1.095367e+06   \n",
      "10  2019-01-09 00:00:00  000001   9.94    1000  1.085422e+06   \n",
      "11  2019-01-09 00:00:00  000002  25.33    1000  1.060086e+06   \n",
      "12  2019-01-10 00:00:00  000001  10.10    1000  1.049981e+06   \n",
      "13  2019-01-10 00:00:00  000002  25.11    1000  1.024864e+06   \n",
      "14  2019-01-11 00:00:00  000001  10.20    1000  1.014659e+06   \n",
      "15  2019-01-11 00:00:00  000002  25.30   -4000  1.115733e+06   \n",
      "16  2019-01-14 00:00:00  000001  10.11   -6000  1.176317e+06   \n",
      "\n",
      "                                order_id realorder_id trade_id account_cookie  \\\n",
      "0   e23f9e01-e8d2-4a05-93ef-9163ce7a83ee         None     None              x   \n",
      "1   1f430faa-86d1-440b-abf7-a7feddc17954         None     None              x   \n",
      "2   0230d608-91cc-422e-8deb-218f4faef3d7         None     None              x   \n",
      "3   427f1eed-b3bd-4078-94e3-156bf3ae21a6         None     None              x   \n",
      "4   48fd88b8-e3c0-4df5-94ef-62b936345bd9         None     None              x   \n",
      "5   d9aff179-9bc3-4268-b2d5-37eee8de309f         None     None              x   \n",
      "6   41f23955-b920-4f04-bcb7-ca1cd960aa45         None     None              x   \n",
      "7   cb2fdd74-7326-41d9-812f-9d88da447741         None     None              x   \n",
      "8   8ef82ee7-87b8-4f7d-8a01-374f52b60cbb         None     None              x   \n",
      "9   1f63fa52-f56b-4814-8eb3-5e4de849f3cb         None     None              x   \n",
      "10  13e77d45-9e2c-4ef3-89f5-7fa63cc3b808         None     None              x   \n",
      "11  7e714c35-83a4-4cb4-8ab5-d4fb2b31ccb7         None     None              x   \n",
      "12  380f932e-7871-4c72-94d3-5077861c9f53         None     None              x   \n",
      "13  3966e418-9017-4565-b24f-ed9455ef5593         None     None              x   \n",
      "14  99048106-f032-45a2-92c6-5a076f899a8a         None     None              x   \n",
      "15  3529f52a-3c09-46fc-944d-b3c619af7cd7         None     None              x   \n",
      "16  650c29d4-459c-412a-8000-c881af3c662a         None     None              x   \n",
      "\n",
      "    commission     tax message  frozen  direction  total_frozen  \n",
      "0       5.0000    0.00    None       0          1             0  \n",
      "1       5.9750    0.00    None       0          1             0  \n",
      "2       5.0000    0.00    None       0          1             0  \n",
      "3       6.0175   24.07    None       0         -1             0  \n",
      "4       5.0000   19.50    None       0         -1             0  \n",
      "5       6.2325    0.00    None       0          1             0  \n",
      "6       5.0000    0.00    None       0          1             0  \n",
      "7      12.5250   50.10    None       0         -1             0  \n",
      "8       7.2450   28.98    None       0         -1             0  \n",
      "9      12.5000   50.00    None       0         -1             0  \n",
      "10      5.0000    0.00    None       0          1             0  \n",
      "11      6.3325    0.00    None       0          1             0  \n",
      "12      5.0000    0.00    None       0          1             0  \n",
      "13      6.2775    0.00    None       0          1             0  \n",
      "14      5.0000    0.00    None       0          1             0  \n",
      "15     25.3000  101.20    None       0         -1             0  \n",
      "16     15.1650   60.66    None       0         -1             0  \n"
     ]
    },
    {
     "name": "stdin",
     "output_type": "stream",
     "text": [
      " \n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "open      2.513000e+01\n",
      "high      2.530000e+01\n",
      "low       2.492000e+01\n",
      "close     2.502000e+01\n",
      "volume    1.832810e+05\n",
      "amount    4.591518e+08\n",
      "Name: (2019-01-14 00:00:00, 000002), dtype: float64\n",
      "---------------under is 当前全市场的market_data --------------\n",
      "                    open   high    low  close    volume       amount\n",
      "2019-01-14 000001  10.22  10.25  10.07  10.11  500443.0  507862880.0\n",
      "           000002  25.13  25.30  24.92  25.02  183281.0  459151840.0\n",
      "---------------under is 当前品种的market_data --------------\n",
      "                    open   high    low  close    volume        amount\n",
      "2019-01-02 000002  23.83  24.09  23.67  23.90  247010.0  5.893846e+08\n",
      "2019-01-03 000002  23.79  24.50  23.71  24.07  222353.0  5.363333e+08\n",
      "2019-01-04 000002  23.91  25.00  23.85  24.93  377727.0  9.270117e+08\n",
      "2019-01-07 000002  25.29  25.53  24.99  25.05  427154.0  1.077909e+09\n",
      "2019-01-08 000002  25.05  25.20  24.63  25.00  214382.0  5.336044e+08\n",
      "2019-01-09 000002  25.40  25.88  25.11  25.33  340140.0  8.670814e+08\n",
      "2019-01-10 000002  25.22  25.56  25.03  25.11  224649.0  5.689526e+08\n",
      "2019-01-11 000002  25.10  25.54  25.01  25.30  240694.0  6.069947e+08\n",
      "2019-01-14 000002  25.13  25.30  24.92  25.02  183281.0  4.591518e+08\n",
      "000002\n",
      "---------------under is 账户情况和持仓情况 -------------------\n",
      "{'code': '000002', 'instrument_id': '000002', 'user_id': 'x', 'portfolio_cookie': 'default', 'username': 'quantaxis', 'position_id': '5aa694d0-3861-43a8-9efc-84f380138bea', 'account_cookie': 'x', 'frozen': {}, 'name': None, 'spms_id': None, 'oms_id': None, 'market_type': 'stock_cn', 'exchange_id': None, 'moneypreset': 100000, 'moneypresetLeft': 100000, 'lastupdatetime': '', 'volume_long_today': 5000, 'volume_long_his': 0, 'volume_long': 5000, 'volume_short_today': 0, 'volume_short_his': 0, 'volume_short': 0, 'volume_long_frozen_today': 0, 'volume_long_frozen_his': 0, 'volume_long_frozen': 0, 'volume_short_frozen_today': 0, 'volume_short_frozen_his': 0, 'volume_short_frozen': 0, 'margin_long': 124290.0, 'margin_short': 0, 'margin': 124290.0, 'position_price_long': 24.858, 'position_cost_long': 124290.0, 'position_price_short': 0, 'position_cost_short': 0, 'open_price_long': 24.858, 'open_cost_long': 124290.0, 'open_price_short': 0, 'open_cost_short': 0, 'trades': [], 'orders': {}, 'last_price': 25.02, 'float_profit_long': 810.0, 'float_profit_short': 0.0, 'float_profit': 810.0, 'position_profit_long': 810.0, 'position_profit_short': 0.0, 'position_profit': 810.0}\n",
      "               datetime    code  price  amount          cash  \\\n",
      "0   2019-01-02 00:00:00  000001   9.19    1000  9.908050e+05   \n",
      "1   2019-01-02 00:00:00  000002  23.90    1000  9.668990e+05   \n",
      "2   2019-01-03 00:00:00  000001   9.28    1000  9.576140e+05   \n",
      "3   2019-01-03 00:00:00  000002  24.07   -1000  9.816539e+05   \n",
      "4   2019-01-04 00:00:00  000001   9.75   -2000  1.001129e+06   \n",
      "5   2019-01-04 00:00:00  000002  24.93    1000  9.761932e+05   \n",
      "6   2019-01-07 00:00:00  000001   9.74    1000  9.664482e+05   \n",
      "7   2019-01-07 00:00:00  000002  25.05   -2000  1.016486e+06   \n",
      "8   2019-01-08 00:00:00  000001   9.66   -3000  1.045429e+06   \n",
      "9   2019-01-08 00:00:00  000002  25.00   -2000  1.095367e+06   \n",
      "10  2019-01-09 00:00:00  000001   9.94    1000  1.085422e+06   \n",
      "11  2019-01-09 00:00:00  000002  25.33    1000  1.060086e+06   \n",
      "12  2019-01-10 00:00:00  000001  10.10    1000  1.049981e+06   \n",
      "13  2019-01-10 00:00:00  000002  25.11    1000  1.024864e+06   \n",
      "14  2019-01-11 00:00:00  000001  10.20    1000  1.014659e+06   \n",
      "15  2019-01-11 00:00:00  000002  25.30   -4000  1.115733e+06   \n",
      "16  2019-01-14 00:00:00  000001  10.11   -6000  1.176317e+06   \n",
      "17  2019-01-14 00:00:00  000002  25.02    1000  1.151291e+06   \n",
      "\n",
      "                                order_id realorder_id trade_id account_cookie  \\\n",
      "0   e23f9e01-e8d2-4a05-93ef-9163ce7a83ee         None     None              x   \n",
      "1   1f430faa-86d1-440b-abf7-a7feddc17954         None     None              x   \n",
      "2   0230d608-91cc-422e-8deb-218f4faef3d7         None     None              x   \n",
      "3   427f1eed-b3bd-4078-94e3-156bf3ae21a6         None     None              x   \n",
      "4   48fd88b8-e3c0-4df5-94ef-62b936345bd9         None     None              x   \n",
      "5   d9aff179-9bc3-4268-b2d5-37eee8de309f         None     None              x   \n",
      "6   41f23955-b920-4f04-bcb7-ca1cd960aa45         None     None              x   \n",
      "7   cb2fdd74-7326-41d9-812f-9d88da447741         None     None              x   \n",
      "8   8ef82ee7-87b8-4f7d-8a01-374f52b60cbb         None     None              x   \n",
      "9   1f63fa52-f56b-4814-8eb3-5e4de849f3cb         None     None              x   \n",
      "10  13e77d45-9e2c-4ef3-89f5-7fa63cc3b808         None     None              x   \n",
      "11  7e714c35-83a4-4cb4-8ab5-d4fb2b31ccb7         None     None              x   \n",
      "12  380f932e-7871-4c72-94d3-5077861c9f53         None     None              x   \n",
      "13  3966e418-9017-4565-b24f-ed9455ef5593         None     None              x   \n",
      "14  99048106-f032-45a2-92c6-5a076f899a8a         None     None              x   \n",
      "15  3529f52a-3c09-46fc-944d-b3c619af7cd7         None     None              x   \n",
      "16  650c29d4-459c-412a-8000-c881af3c662a         None     None              x   \n",
      "17  9d0b7e50-53ac-42df-9175-c3f303387629         None     None              x   \n",
      "\n",
      "    commission     tax message  frozen  direction  total_frozen  \n",
      "0       5.0000    0.00    None       0          1             0  \n",
      "1       5.9750    0.00    None       0          1             0  \n",
      "2       5.0000    0.00    None       0          1             0  \n",
      "3       6.0175   24.07    None       0         -1             0  \n",
      "4       5.0000   19.50    None       0         -1             0  \n",
      "5       6.2325    0.00    None       0          1             0  \n",
      "6       5.0000    0.00    None       0          1             0  \n",
      "7      12.5250   50.10    None       0         -1             0  \n",
      "8       7.2450   28.98    None       0         -1             0  \n",
      "9      12.5000   50.00    None       0         -1             0  \n",
      "10      5.0000    0.00    None       0          1             0  \n",
      "11      6.3325    0.00    None       0          1             0  \n",
      "12      5.0000    0.00    None       0          1             0  \n",
      "13      6.2775    0.00    None       0          1             0  \n",
      "14      5.0000    0.00    None       0          1             0  \n",
      "15     25.3000  101.20    None       0         -1             0  \n",
      "16     15.1650   60.66    None       0         -1             0  \n",
      "17      6.2550    0.00    None       0          1             0  \n"
     ]
    },
    {
     "name": "stdin",
     "output_type": "stream",
     "text": [
      " \n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "backtest: Settle!\n",
      "open      1.011000e+01\n",
      "high      1.028000e+01\n",
      "low       1.009000e+01\n",
      "close     1.024000e+01\n",
      "volume    5.421600e+05\n",
      "amount    5.530273e+08\n",
      "Name: (2019-01-15 00:00:00, 000001), dtype: float64\n",
      "---------------under is 当前全市场的market_data --------------\n",
      "                    open   high    low  close    volume       amount\n",
      "2019-01-15 000001  10.11  10.28  10.09  10.24  542160.0  553027328.0\n",
      "---------------under is 当前品种的market_data --------------\n",
      "                    open   high    low  close     volume        amount\n",
      "2019-01-02 000001   9.39   9.42   9.16   9.19   539386.0  4.986951e+08\n",
      "2019-01-03 000001   9.18   9.33   9.15   9.28   415537.0  3.844577e+08\n",
      "2019-01-04 000001   9.24   9.82   9.22   9.75  1481159.0  1.422150e+09\n",
      "2019-01-07 000001   9.84   9.85   9.63   9.74   865687.0  8.411664e+08\n",
      "2019-01-08 000001   9.73   9.74   9.62   9.66   402388.0  3.892478e+08\n",
      "2019-01-09 000001   9.74  10.08   9.70   9.94  1233486.0  1.229465e+09\n",
      "2019-01-10 000001   9.87  10.20   9.86  10.10  1071817.0  1.079711e+09\n",
      "2019-01-11 000001  10.11  10.22  10.05  10.20   696364.0  7.080018e+08\n",
      "2019-01-14 000001  10.22  10.25  10.07  10.11   500443.0  5.078629e+08\n",
      "2019-01-15 000001  10.11  10.28  10.09  10.24   542160.0  5.530273e+08\n",
      "000001\n",
      "---------------under is 账户情况和持仓情况 -------------------\n",
      "{'code': '000001', 'instrument_id': '000001', 'user_id': 'x', 'portfolio_cookie': 'default', 'username': 'quantaxis', 'position_id': 'd2b24d5c-fb1e-4a2e-97eb-f19b04f544ec', 'account_cookie': 'x', 'frozen': {}, 'name': None, 'spms_id': None, 'oms_id': None, 'market_type': 'stock_cn', 'exchange_id': None, 'moneypreset': 100000, 'moneypresetLeft': 100000, 'lastupdatetime': '', 'volume_long_today': 7000, 'volume_long_his': 0, 'volume_long': 7000, 'volume_short_today': 0, 'volume_short_his': 0, 'volume_short': 0, 'volume_long_frozen_today': 0, 'volume_long_frozen_his': 0, 'volume_long_frozen': 0, 'volume_short_frozen_today': 0, 'volume_short_frozen_his': 0, 'volume_short_frozen': 0, 'margin_long': 68690.0, 'margin_short': 0, 'margin': 68690.0, 'position_price_long': 9.812857142857142, 'position_cost_long': 68690.0, 'position_price_short': 0, 'position_cost_short': 0, 'open_price_long': 9.812857142857142, 'open_cost_long': 68690.0, 'open_price_short': 0, 'open_cost_short': 0, 'trades': [], 'orders': {}, 'last_price': 10.24, 'float_profit_long': 2990.0, 'float_profit_short': 0.0, 'float_profit': 2990.0, 'position_profit_long': 2990.0, 'position_profit_short': 0.0, 'position_profit': 2990.0}\n",
      "               datetime    code  price  amount          cash  \\\n",
      "0   2019-01-02 00:00:00  000001   9.19    1000  9.908050e+05   \n",
      "1   2019-01-02 00:00:00  000002  23.90    1000  9.668990e+05   \n",
      "2   2019-01-03 00:00:00  000001   9.28    1000  9.576140e+05   \n",
      "3   2019-01-03 00:00:00  000002  24.07   -1000  9.816539e+05   \n",
      "4   2019-01-04 00:00:00  000001   9.75   -2000  1.001129e+06   \n",
      "5   2019-01-04 00:00:00  000002  24.93    1000  9.761932e+05   \n",
      "6   2019-01-07 00:00:00  000001   9.74    1000  9.664482e+05   \n",
      "7   2019-01-07 00:00:00  000002  25.05   -2000  1.016486e+06   \n",
      "8   2019-01-08 00:00:00  000001   9.66   -3000  1.045429e+06   \n",
      "9   2019-01-08 00:00:00  000002  25.00   -2000  1.095367e+06   \n",
      "10  2019-01-09 00:00:00  000001   9.94    1000  1.085422e+06   \n",
      "11  2019-01-09 00:00:00  000002  25.33    1000  1.060086e+06   \n",
      "12  2019-01-10 00:00:00  000001  10.10    1000  1.049981e+06   \n",
      "13  2019-01-10 00:00:00  000002  25.11    1000  1.024864e+06   \n",
      "14  2019-01-11 00:00:00  000001  10.20    1000  1.014659e+06   \n",
      "15  2019-01-11 00:00:00  000002  25.30   -4000  1.115733e+06   \n",
      "16  2019-01-14 00:00:00  000001  10.11   -6000  1.176317e+06   \n",
      "17  2019-01-14 00:00:00  000002  25.02    1000  1.151291e+06   \n",
      "18  2019-01-15 00:00:00  000001  10.24    1000  1.141046e+06   \n",
      "\n",
      "                                order_id realorder_id trade_id account_cookie  \\\n",
      "0   e23f9e01-e8d2-4a05-93ef-9163ce7a83ee         None     None              x   \n",
      "1   1f430faa-86d1-440b-abf7-a7feddc17954         None     None              x   \n",
      "2   0230d608-91cc-422e-8deb-218f4faef3d7         None     None              x   \n",
      "3   427f1eed-b3bd-4078-94e3-156bf3ae21a6         None     None              x   \n",
      "4   48fd88b8-e3c0-4df5-94ef-62b936345bd9         None     None              x   \n",
      "5   d9aff179-9bc3-4268-b2d5-37eee8de309f         None     None              x   \n",
      "6   41f23955-b920-4f04-bcb7-ca1cd960aa45         None     None              x   \n",
      "7   cb2fdd74-7326-41d9-812f-9d88da447741         None     None              x   \n",
      "8   8ef82ee7-87b8-4f7d-8a01-374f52b60cbb         None     None              x   \n",
      "9   1f63fa52-f56b-4814-8eb3-5e4de849f3cb         None     None              x   \n",
      "10  13e77d45-9e2c-4ef3-89f5-7fa63cc3b808         None     None              x   \n",
      "11  7e714c35-83a4-4cb4-8ab5-d4fb2b31ccb7         None     None              x   \n",
      "12  380f932e-7871-4c72-94d3-5077861c9f53         None     None              x   \n",
      "13  3966e418-9017-4565-b24f-ed9455ef5593         None     None              x   \n",
      "14  99048106-f032-45a2-92c6-5a076f899a8a         None     None              x   \n",
      "15  3529f52a-3c09-46fc-944d-b3c619af7cd7         None     None              x   \n",
      "16  650c29d4-459c-412a-8000-c881af3c662a         None     None              x   \n",
      "17  9d0b7e50-53ac-42df-9175-c3f303387629         None     None              x   \n",
      "18  80ac049d-602e-44ff-a799-3be84acdfe55         None     None              x   \n",
      "\n",
      "    commission     tax message  frozen  direction  total_frozen  \n",
      "0       5.0000    0.00    None       0          1             0  \n",
      "1       5.9750    0.00    None       0          1             0  \n",
      "2       5.0000    0.00    None       0          1             0  \n",
      "3       6.0175   24.07    None       0         -1             0  \n",
      "4       5.0000   19.50    None       0         -1             0  \n",
      "5       6.2325    0.00    None       0          1             0  \n",
      "6       5.0000    0.00    None       0          1             0  \n",
      "7      12.5250   50.10    None       0         -1             0  \n",
      "8       7.2450   28.98    None       0         -1             0  \n",
      "9      12.5000   50.00    None       0         -1             0  \n",
      "10      5.0000    0.00    None       0          1             0  \n",
      "11      6.3325    0.00    None       0          1             0  \n",
      "12      5.0000    0.00    None       0          1             0  \n",
      "13      6.2775    0.00    None       0          1             0  \n",
      "14      5.0000    0.00    None       0          1             0  \n",
      "15     25.3000  101.20    None       0         -1             0  \n",
      "16     15.1650   60.66    None       0         -1             0  \n",
      "17      6.2550    0.00    None       0          1             0  \n",
      "18      5.0000    0.00    None       0          1             0  \n"
     ]
    },
    {
     "name": "stdin",
     "output_type": "stream",
     "text": [
      " \n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "open      2.500000e+01\n",
      "high      2.516000e+01\n",
      "low       2.432000e+01\n",
      "close     2.516000e+01\n",
      "volume    3.687580e+05\n",
      "amount    9.149835e+08\n",
      "Name: (2019-01-15 00:00:00, 000002), dtype: float64\n",
      "---------------under is 当前全市场的market_data --------------\n",
      "                    open   high    low  close    volume       amount\n",
      "2019-01-15 000001  10.11  10.28  10.09  10.24  542160.0  553027328.0\n",
      "           000002  25.00  25.16  24.32  25.16  368758.0  914983488.0\n",
      "---------------under is 当前品种的market_data --------------\n",
      "                    open   high    low  close    volume        amount\n",
      "2019-01-02 000002  23.83  24.09  23.67  23.90  247010.0  5.893846e+08\n",
      "2019-01-03 000002  23.79  24.50  23.71  24.07  222353.0  5.363333e+08\n",
      "2019-01-04 000002  23.91  25.00  23.85  24.93  377727.0  9.270117e+08\n",
      "2019-01-07 000002  25.29  25.53  24.99  25.05  427154.0  1.077909e+09\n",
      "2019-01-08 000002  25.05  25.20  24.63  25.00  214382.0  5.336044e+08\n",
      "2019-01-09 000002  25.40  25.88  25.11  25.33  340140.0  8.670814e+08\n",
      "2019-01-10 000002  25.22  25.56  25.03  25.11  224649.0  5.689526e+08\n",
      "2019-01-11 000002  25.10  25.54  25.01  25.30  240694.0  6.069947e+08\n",
      "2019-01-14 000002  25.13  25.30  24.92  25.02  183281.0  4.591518e+08\n",
      "2019-01-15 000002  25.00  25.16  24.32  25.16  368758.0  9.149835e+08\n",
      "000002\n",
      "---------------under is 账户情况和持仓情况 -------------------\n",
      "{'code': '000002', 'instrument_id': '000002', 'user_id': 'x', 'portfolio_cookie': 'default', 'username': 'quantaxis', 'position_id': '5aa694d0-3861-43a8-9efc-84f380138bea', 'account_cookie': 'x', 'frozen': {}, 'name': None, 'spms_id': None, 'oms_id': None, 'market_type': 'stock_cn', 'exchange_id': None, 'moneypreset': 100000, 'moneypresetLeft': 100000, 'lastupdatetime': '', 'volume_long_today': 5000, 'volume_long_his': 0, 'volume_long': 5000, 'volume_short_today': 0, 'volume_short_his': 0, 'volume_short': 0, 'volume_long_frozen_today': 0, 'volume_long_frozen_his': 0, 'volume_long_frozen': 0, 'volume_short_frozen_today': 0, 'volume_short_frozen_his': 0, 'volume_short_frozen': 0, 'margin_long': 124290.0, 'margin_short': 0, 'margin': 124290.0, 'position_price_long': 24.858, 'position_cost_long': 124290.0, 'position_price_short': 0, 'position_cost_short': 0, 'open_price_long': 24.858, 'open_cost_long': 124290.0, 'open_price_short': 0, 'open_cost_short': 0, 'trades': [], 'orders': {}, 'last_price': 25.16, 'float_profit_long': 1510.0, 'float_profit_short': 0.0, 'float_profit': 1510.0, 'position_profit_long': 1510.0, 'position_profit_short': 0.0, 'position_profit': 1510.0}\n",
      "               datetime    code  price  amount          cash  \\\n",
      "0   2019-01-02 00:00:00  000001   9.19    1000  9.908050e+05   \n",
      "1   2019-01-02 00:00:00  000002  23.90    1000  9.668990e+05   \n",
      "2   2019-01-03 00:00:00  000001   9.28    1000  9.576140e+05   \n",
      "3   2019-01-03 00:00:00  000002  24.07   -1000  9.816539e+05   \n",
      "4   2019-01-04 00:00:00  000001   9.75   -2000  1.001129e+06   \n",
      "5   2019-01-04 00:00:00  000002  24.93    1000  9.761932e+05   \n",
      "6   2019-01-07 00:00:00  000001   9.74    1000  9.664482e+05   \n",
      "7   2019-01-07 00:00:00  000002  25.05   -2000  1.016486e+06   \n",
      "8   2019-01-08 00:00:00  000001   9.66   -3000  1.045429e+06   \n",
      "9   2019-01-08 00:00:00  000002  25.00   -2000  1.095367e+06   \n",
      "10  2019-01-09 00:00:00  000001   9.94    1000  1.085422e+06   \n",
      "11  2019-01-09 00:00:00  000002  25.33    1000  1.060086e+06   \n",
      "12  2019-01-10 00:00:00  000001  10.10    1000  1.049981e+06   \n",
      "13  2019-01-10 00:00:00  000002  25.11    1000  1.024864e+06   \n",
      "14  2019-01-11 00:00:00  000001  10.20    1000  1.014659e+06   \n",
      "15  2019-01-11 00:00:00  000002  25.30   -4000  1.115733e+06   \n",
      "16  2019-01-14 00:00:00  000001  10.11   -6000  1.176317e+06   \n",
      "17  2019-01-14 00:00:00  000002  25.02    1000  1.151291e+06   \n",
      "18  2019-01-15 00:00:00  000001  10.24    1000  1.141046e+06   \n",
      "19  2019-01-15 00:00:00  000002  25.16   -5000  1.266688e+06   \n",
      "\n",
      "                                order_id realorder_id trade_id account_cookie  \\\n",
      "0   e23f9e01-e8d2-4a05-93ef-9163ce7a83ee         None     None              x   \n",
      "1   1f430faa-86d1-440b-abf7-a7feddc17954         None     None              x   \n",
      "2   0230d608-91cc-422e-8deb-218f4faef3d7         None     None              x   \n",
      "3   427f1eed-b3bd-4078-94e3-156bf3ae21a6         None     None              x   \n",
      "4   48fd88b8-e3c0-4df5-94ef-62b936345bd9         None     None              x   \n",
      "5   d9aff179-9bc3-4268-b2d5-37eee8de309f         None     None              x   \n",
      "6   41f23955-b920-4f04-bcb7-ca1cd960aa45         None     None              x   \n",
      "7   cb2fdd74-7326-41d9-812f-9d88da447741         None     None              x   \n",
      "8   8ef82ee7-87b8-4f7d-8a01-374f52b60cbb         None     None              x   \n",
      "9   1f63fa52-f56b-4814-8eb3-5e4de849f3cb         None     None              x   \n",
      "10  13e77d45-9e2c-4ef3-89f5-7fa63cc3b808         None     None              x   \n",
      "11  7e714c35-83a4-4cb4-8ab5-d4fb2b31ccb7         None     None              x   \n",
      "12  380f932e-7871-4c72-94d3-5077861c9f53         None     None              x   \n",
      "13  3966e418-9017-4565-b24f-ed9455ef5593         None     None              x   \n",
      "14  99048106-f032-45a2-92c6-5a076f899a8a         None     None              x   \n",
      "15  3529f52a-3c09-46fc-944d-b3c619af7cd7         None     None              x   \n",
      "16  650c29d4-459c-412a-8000-c881af3c662a         None     None              x   \n",
      "17  9d0b7e50-53ac-42df-9175-c3f303387629         None     None              x   \n",
      "18  80ac049d-602e-44ff-a799-3be84acdfe55         None     None              x   \n",
      "19  e354ff47-4298-4d5a-a22e-794e327dee61         None     None              x   \n",
      "\n",
      "    commission     tax message  frozen  direction  total_frozen  \n",
      "0       5.0000    0.00    None       0          1             0  \n",
      "1       5.9750    0.00    None       0          1             0  \n",
      "2       5.0000    0.00    None       0          1             0  \n",
      "3       6.0175   24.07    None       0         -1             0  \n",
      "4       5.0000   19.50    None       0         -1             0  \n",
      "5       6.2325    0.00    None       0          1             0  \n",
      "6       5.0000    0.00    None       0          1             0  \n",
      "7      12.5250   50.10    None       0         -1             0  \n",
      "8       7.2450   28.98    None       0         -1             0  \n",
      "9      12.5000   50.00    None       0         -1             0  \n",
      "10      5.0000    0.00    None       0          1             0  \n",
      "11      6.3325    0.00    None       0          1             0  \n",
      "12      5.0000    0.00    None       0          1             0  \n",
      "13      6.2775    0.00    None       0          1             0  \n",
      "14      5.0000    0.00    None       0          1             0  \n",
      "15     25.3000  101.20    None       0         -1             0  \n",
      "16     15.1650   60.66    None       0         -1             0  \n",
      "17      6.2550    0.00    None       0          1             0  \n",
      "18      5.0000    0.00    None       0          1             0  \n",
      "19     31.4500  125.80    None       0         -1             0  \n"
     ]
    },
    {
     "name": "stdin",
     "output_type": "stream",
     "text": [
      " \n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "backtest: Settle!\n",
      "open      1.024000e+01\n",
      "high      1.050000e+01\n",
      "low       1.023000e+01\n",
      "close     1.048000e+01\n",
      "volume    9.776990e+05\n",
      "amount    1.017495e+09\n",
      "Name: (2019-01-16 00:00:00, 000001), dtype: float64\n",
      "---------------under is 当前全市场的market_data --------------\n",
      "                    open  high    low  close    volume        amount\n",
      "2019-01-16 000001  10.24  10.5  10.23  10.48  977699.0  1.017495e+09\n",
      "---------------under is 当前品种的market_data --------------\n",
      "                    open   high    low  close     volume        amount\n",
      "2019-01-02 000001   9.39   9.42   9.16   9.19   539386.0  4.986951e+08\n",
      "2019-01-03 000001   9.18   9.33   9.15   9.28   415537.0  3.844577e+08\n",
      "2019-01-04 000001   9.24   9.82   9.22   9.75  1481159.0  1.422150e+09\n",
      "2019-01-07 000001   9.84   9.85   9.63   9.74   865687.0  8.411664e+08\n",
      "2019-01-08 000001   9.73   9.74   9.62   9.66   402388.0  3.892478e+08\n",
      "2019-01-09 000001   9.74  10.08   9.70   9.94  1233486.0  1.229465e+09\n",
      "2019-01-10 000001   9.87  10.20   9.86  10.10  1071817.0  1.079711e+09\n",
      "2019-01-11 000001  10.11  10.22  10.05  10.20   696364.0  7.080018e+08\n",
      "2019-01-14 000001  10.22  10.25  10.07  10.11   500443.0  5.078629e+08\n",
      "2019-01-15 000001  10.11  10.28  10.09  10.24   542160.0  5.530273e+08\n",
      "2019-01-16 000001  10.24  10.50  10.23  10.48   977699.0  1.017495e+09\n",
      "000001\n",
      "---------------under is 账户情况和持仓情况 -------------------\n",
      "{'code': '000001', 'instrument_id': '000001', 'user_id': 'x', 'portfolio_cookie': 'default', 'username': 'quantaxis', 'position_id': 'd2b24d5c-fb1e-4a2e-97eb-f19b04f544ec', 'account_cookie': 'x', 'frozen': {}, 'name': None, 'spms_id': None, 'oms_id': None, 'market_type': 'stock_cn', 'exchange_id': None, 'moneypreset': 100000, 'moneypresetLeft': 100000, 'lastupdatetime': '', 'volume_long_today': 7000, 'volume_long_his': 0, 'volume_long': 7000, 'volume_short_today': 0, 'volume_short_his': 0, 'volume_short': 0, 'volume_long_frozen_today': 0, 'volume_long_frozen_his': 0, 'volume_long_frozen': 0, 'volume_short_frozen_today': 0, 'volume_short_frozen_his': 0, 'volume_short_frozen': 0, 'margin_long': 68690.0, 'margin_short': 0, 'margin': 68690.0, 'position_price_long': 9.812857142857142, 'position_cost_long': 68690.0, 'position_price_short': 0, 'position_cost_short': 0, 'open_price_long': 9.812857142857142, 'open_cost_long': 68690.0, 'open_price_short': 0, 'open_cost_short': 0, 'trades': [], 'orders': {}, 'last_price': 10.48, 'float_profit_long': 4670.0, 'float_profit_short': 0.0, 'float_profit': 4670.0, 'position_profit_long': 4670.0, 'position_profit_short': 0.0, 'position_profit': 4670.0}\n",
      "               datetime    code  price  amount          cash  \\\n",
      "0   2019-01-02 00:00:00  000001   9.19    1000  9.908050e+05   \n",
      "1   2019-01-02 00:00:00  000002  23.90    1000  9.668990e+05   \n",
      "2   2019-01-03 00:00:00  000001   9.28    1000  9.576140e+05   \n",
      "3   2019-01-03 00:00:00  000002  24.07   -1000  9.816539e+05   \n",
      "4   2019-01-04 00:00:00  000001   9.75   -2000  1.001129e+06   \n",
      "5   2019-01-04 00:00:00  000002  24.93    1000  9.761932e+05   \n",
      "6   2019-01-07 00:00:00  000001   9.74    1000  9.664482e+05   \n",
      "7   2019-01-07 00:00:00  000002  25.05   -2000  1.016486e+06   \n",
      "8   2019-01-08 00:00:00  000001   9.66   -3000  1.045429e+06   \n",
      "9   2019-01-08 00:00:00  000002  25.00   -2000  1.095367e+06   \n",
      "10  2019-01-09 00:00:00  000001   9.94    1000  1.085422e+06   \n",
      "11  2019-01-09 00:00:00  000002  25.33    1000  1.060086e+06   \n",
      "12  2019-01-10 00:00:00  000001  10.10    1000  1.049981e+06   \n",
      "13  2019-01-10 00:00:00  000002  25.11    1000  1.024864e+06   \n",
      "14  2019-01-11 00:00:00  000001  10.20    1000  1.014659e+06   \n",
      "15  2019-01-11 00:00:00  000002  25.30   -4000  1.115733e+06   \n",
      "16  2019-01-14 00:00:00  000001  10.11   -6000  1.176317e+06   \n",
      "17  2019-01-14 00:00:00  000002  25.02    1000  1.151291e+06   \n",
      "18  2019-01-15 00:00:00  000001  10.24    1000  1.141046e+06   \n",
      "19  2019-01-15 00:00:00  000002  25.16   -5000  1.266688e+06   \n",
      "20  2019-01-16 00:00:00  000001  10.48   -7000  1.339957e+06   \n",
      "\n",
      "                                order_id realorder_id trade_id account_cookie  \\\n",
      "0   e23f9e01-e8d2-4a05-93ef-9163ce7a83ee         None     None              x   \n",
      "1   1f430faa-86d1-440b-abf7-a7feddc17954         None     None              x   \n",
      "2   0230d608-91cc-422e-8deb-218f4faef3d7         None     None              x   \n",
      "3   427f1eed-b3bd-4078-94e3-156bf3ae21a6         None     None              x   \n",
      "4   48fd88b8-e3c0-4df5-94ef-62b936345bd9         None     None              x   \n",
      "5   d9aff179-9bc3-4268-b2d5-37eee8de309f         None     None              x   \n",
      "6   41f23955-b920-4f04-bcb7-ca1cd960aa45         None     None              x   \n",
      "7   cb2fdd74-7326-41d9-812f-9d88da447741         None     None              x   \n",
      "8   8ef82ee7-87b8-4f7d-8a01-374f52b60cbb         None     None              x   \n",
      "9   1f63fa52-f56b-4814-8eb3-5e4de849f3cb         None     None              x   \n",
      "10  13e77d45-9e2c-4ef3-89f5-7fa63cc3b808         None     None              x   \n",
      "11  7e714c35-83a4-4cb4-8ab5-d4fb2b31ccb7         None     None              x   \n",
      "12  380f932e-7871-4c72-94d3-5077861c9f53         None     None              x   \n",
      "13  3966e418-9017-4565-b24f-ed9455ef5593         None     None              x   \n",
      "14  99048106-f032-45a2-92c6-5a076f899a8a         None     None              x   \n",
      "15  3529f52a-3c09-46fc-944d-b3c619af7cd7         None     None              x   \n",
      "16  650c29d4-459c-412a-8000-c881af3c662a         None     None              x   \n",
      "17  9d0b7e50-53ac-42df-9175-c3f303387629         None     None              x   \n",
      "18  80ac049d-602e-44ff-a799-3be84acdfe55         None     None              x   \n",
      "19  e354ff47-4298-4d5a-a22e-794e327dee61         None     None              x   \n",
      "20  4977e6e3-e6ee-4d8c-8c43-9b1f027e07b1         None     None              x   \n",
      "\n",
      "    commission     tax message  frozen  direction  total_frozen  \n",
      "0       5.0000    0.00    None       0          1             0  \n",
      "1       5.9750    0.00    None       0          1             0  \n",
      "2       5.0000    0.00    None       0          1             0  \n",
      "3       6.0175   24.07    None       0         -1             0  \n",
      "4       5.0000   19.50    None       0         -1             0  \n",
      "5       6.2325    0.00    None       0          1             0  \n",
      "6       5.0000    0.00    None       0          1             0  \n",
      "7      12.5250   50.10    None       0         -1             0  \n",
      "8       7.2450   28.98    None       0         -1             0  \n",
      "9      12.5000   50.00    None       0         -1             0  \n",
      "10      5.0000    0.00    None       0          1             0  \n",
      "11      6.3325    0.00    None       0          1             0  \n",
      "12      5.0000    0.00    None       0          1             0  \n",
      "13      6.2775    0.00    None       0          1             0  \n",
      "14      5.0000    0.00    None       0          1             0  \n",
      "15     25.3000  101.20    None       0         -1             0  \n",
      "16     15.1650   60.66    None       0         -1             0  \n",
      "17      6.2550    0.00    None       0          1             0  \n",
      "18      5.0000    0.00    None       0          1             0  \n",
      "19     31.4500  125.80    None       0         -1             0  \n",
      "20     18.3400   73.36    None       0         -1             0  \n"
     ]
    },
    {
     "name": "stdin",
     "output_type": "stream",
     "text": [
      " \n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "open      2.515000e+01\n",
      "high      2.550000e+01\n",
      "low       2.483000e+01\n",
      "close     2.542000e+01\n",
      "volume    2.674660e+05\n",
      "amount    6.766856e+08\n",
      "Name: (2019-01-16 00:00:00, 000002), dtype: float64\n",
      "---------------under is 当前全市场的market_data --------------\n",
      "                    open  high    low  close    volume        amount\n",
      "2019-01-16 000001  10.24  10.5  10.23  10.48  977699.0  1.017495e+09\n",
      "           000002  25.15  25.5  24.83  25.42  267466.0  6.766856e+08\n",
      "---------------under is 当前品种的market_data --------------\n",
      "                    open   high    low  close    volume        amount\n",
      "2019-01-02 000002  23.83  24.09  23.67  23.90  247010.0  5.893846e+08\n",
      "2019-01-03 000002  23.79  24.50  23.71  24.07  222353.0  5.363333e+08\n",
      "2019-01-04 000002  23.91  25.00  23.85  24.93  377727.0  9.270117e+08\n",
      "2019-01-07 000002  25.29  25.53  24.99  25.05  427154.0  1.077909e+09\n",
      "2019-01-08 000002  25.05  25.20  24.63  25.00  214382.0  5.336044e+08\n",
      "2019-01-09 000002  25.40  25.88  25.11  25.33  340140.0  8.670814e+08\n",
      "2019-01-10 000002  25.22  25.56  25.03  25.11  224649.0  5.689526e+08\n",
      "2019-01-11 000002  25.10  25.54  25.01  25.30  240694.0  6.069947e+08\n",
      "2019-01-14 000002  25.13  25.30  24.92  25.02  183281.0  4.591518e+08\n",
      "2019-01-15 000002  25.00  25.16  24.32  25.16  368758.0  9.149835e+08\n",
      "2019-01-16 000002  25.15  25.50  24.83  25.42  267466.0  6.766856e+08\n",
      "000002\n",
      "---------------under is 账户情况和持仓情况 -------------------\n",
      "{'code': '000002', 'instrument_id': '000002', 'user_id': 'x', 'portfolio_cookie': 'default', 'username': 'quantaxis', 'position_id': '5aa694d0-3861-43a8-9efc-84f380138bea', 'account_cookie': 'x', 'frozen': {}, 'name': None, 'spms_id': None, 'oms_id': None, 'market_type': 'stock_cn', 'exchange_id': None, 'moneypreset': 100000, 'moneypresetLeft': 100000, 'lastupdatetime': '', 'volume_long_today': 6000, 'volume_long_his': 0, 'volume_long': 6000, 'volume_short_today': 0, 'volume_short_his': 0, 'volume_short': 0, 'volume_long_frozen_today': 0, 'volume_long_frozen_his': 0, 'volume_long_frozen': 0, 'volume_short_frozen_today': 0, 'volume_short_frozen_his': 0, 'volume_short_frozen': 0, 'margin_long': 149710.0, 'margin_short': 0, 'margin': 149710.0, 'position_price_long': 24.951666666666668, 'position_cost_long': 149710.0, 'position_price_short': 0, 'position_cost_short': 0, 'open_price_long': 24.951666666666668, 'open_cost_long': 149710.0, 'open_price_short': 0, 'open_cost_short': 0, 'trades': [], 'orders': {}, 'last_price': 25.42, 'float_profit_long': 2810.0, 'float_profit_short': 0.0, 'float_profit': 2810.0, 'position_profit_long': 2810.0, 'position_profit_short': 0.0, 'position_profit': 2810.0}\n",
      "               datetime    code  price  amount          cash  \\\n",
      "0   2019-01-02 00:00:00  000001   9.19    1000  9.908050e+05   \n",
      "1   2019-01-02 00:00:00  000002  23.90    1000  9.668990e+05   \n",
      "2   2019-01-03 00:00:00  000001   9.28    1000  9.576140e+05   \n",
      "3   2019-01-03 00:00:00  000002  24.07   -1000  9.816539e+05   \n",
      "4   2019-01-04 00:00:00  000001   9.75   -2000  1.001129e+06   \n",
      "5   2019-01-04 00:00:00  000002  24.93    1000  9.761932e+05   \n",
      "6   2019-01-07 00:00:00  000001   9.74    1000  9.664482e+05   \n",
      "7   2019-01-07 00:00:00  000002  25.05   -2000  1.016486e+06   \n",
      "8   2019-01-08 00:00:00  000001   9.66   -3000  1.045429e+06   \n",
      "9   2019-01-08 00:00:00  000002  25.00   -2000  1.095367e+06   \n",
      "10  2019-01-09 00:00:00  000001   9.94    1000  1.085422e+06   \n",
      "11  2019-01-09 00:00:00  000002  25.33    1000  1.060086e+06   \n",
      "12  2019-01-10 00:00:00  000001  10.10    1000  1.049981e+06   \n",
      "13  2019-01-10 00:00:00  000002  25.11    1000  1.024864e+06   \n",
      "14  2019-01-11 00:00:00  000001  10.20    1000  1.014659e+06   \n",
      "15  2019-01-11 00:00:00  000002  25.30   -4000  1.115733e+06   \n",
      "16  2019-01-14 00:00:00  000001  10.11   -6000  1.176317e+06   \n",
      "17  2019-01-14 00:00:00  000002  25.02    1000  1.151291e+06   \n",
      "18  2019-01-15 00:00:00  000001  10.24    1000  1.141046e+06   \n",
      "19  2019-01-15 00:00:00  000002  25.16   -5000  1.266688e+06   \n",
      "20  2019-01-16 00:00:00  000001  10.48   -7000  1.339957e+06   \n",
      "21  2019-01-16 00:00:00  000002  25.42    1000  1.314530e+06   \n",
      "\n",
      "                                order_id realorder_id trade_id account_cookie  \\\n",
      "0   e23f9e01-e8d2-4a05-93ef-9163ce7a83ee         None     None              x   \n",
      "1   1f430faa-86d1-440b-abf7-a7feddc17954         None     None              x   \n",
      "2   0230d608-91cc-422e-8deb-218f4faef3d7         None     None              x   \n",
      "3   427f1eed-b3bd-4078-94e3-156bf3ae21a6         None     None              x   \n",
      "4   48fd88b8-e3c0-4df5-94ef-62b936345bd9         None     None              x   \n",
      "5   d9aff179-9bc3-4268-b2d5-37eee8de309f         None     None              x   \n",
      "6   41f23955-b920-4f04-bcb7-ca1cd960aa45         None     None              x   \n",
      "7   cb2fdd74-7326-41d9-812f-9d88da447741         None     None              x   \n",
      "8   8ef82ee7-87b8-4f7d-8a01-374f52b60cbb         None     None              x   \n",
      "9   1f63fa52-f56b-4814-8eb3-5e4de849f3cb         None     None              x   \n",
      "10  13e77d45-9e2c-4ef3-89f5-7fa63cc3b808         None     None              x   \n",
      "11  7e714c35-83a4-4cb4-8ab5-d4fb2b31ccb7         None     None              x   \n",
      "12  380f932e-7871-4c72-94d3-5077861c9f53         None     None              x   \n",
      "13  3966e418-9017-4565-b24f-ed9455ef5593         None     None              x   \n",
      "14  99048106-f032-45a2-92c6-5a076f899a8a         None     None              x   \n",
      "15  3529f52a-3c09-46fc-944d-b3c619af7cd7         None     None              x   \n",
      "16  650c29d4-459c-412a-8000-c881af3c662a         None     None              x   \n",
      "17  9d0b7e50-53ac-42df-9175-c3f303387629         None     None              x   \n",
      "18  80ac049d-602e-44ff-a799-3be84acdfe55         None     None              x   \n",
      "19  e354ff47-4298-4d5a-a22e-794e327dee61         None     None              x   \n",
      "20  4977e6e3-e6ee-4d8c-8c43-9b1f027e07b1         None     None              x   \n",
      "21  16d8792c-b2f0-400d-b2a6-aa5c2e473728         None     None              x   \n",
      "\n",
      "    commission     tax message  frozen  direction  total_frozen  \n",
      "0       5.0000    0.00    None       0          1             0  \n",
      "1       5.9750    0.00    None       0          1             0  \n",
      "2       5.0000    0.00    None       0          1             0  \n",
      "3       6.0175   24.07    None       0         -1             0  \n",
      "4       5.0000   19.50    None       0         -1             0  \n",
      "5       6.2325    0.00    None       0          1             0  \n",
      "6       5.0000    0.00    None       0          1             0  \n",
      "7      12.5250   50.10    None       0         -1             0  \n",
      "8       7.2450   28.98    None       0         -1             0  \n",
      "9      12.5000   50.00    None       0         -1             0  \n",
      "10      5.0000    0.00    None       0          1             0  \n",
      "11      6.3325    0.00    None       0          1             0  \n",
      "12      5.0000    0.00    None       0          1             0  \n",
      "13      6.2775    0.00    None       0          1             0  \n",
      "14      5.0000    0.00    None       0          1             0  \n",
      "15     25.3000  101.20    None       0         -1             0  \n",
      "16     15.1650   60.66    None       0         -1             0  \n",
      "17      6.2550    0.00    None       0          1             0  \n",
      "18      5.0000    0.00    None       0          1             0  \n",
      "19     31.4500  125.80    None       0         -1             0  \n",
      "20     18.3400   73.36    None       0         -1             0  \n",
      "21      6.3550    0.00    None       0          1             0  \n"
     ]
    },
    {
     "name": "stdin",
     "output_type": "stream",
     "text": [
      " \n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "backtest: Settle!\n",
      "open      1.054000e+01\n",
      "high      1.057000e+01\n",
      "low       1.017000e+01\n",
      "close     1.025000e+01\n",
      "volume    8.828110e+05\n",
      "amount    9.102121e+08\n",
      "Name: (2019-01-17 00:00:00, 000001), dtype: float64\n",
      "---------------under is 当前全市场的market_data --------------\n",
      "                    open   high    low  close    volume       amount\n",
      "2019-01-17 000001  10.54  10.57  10.17  10.25  882811.0  910212096.0\n",
      "---------------under is 当前品种的market_data --------------\n",
      "                    open   high    low  close     volume        amount\n",
      "2019-01-02 000001   9.39   9.42   9.16   9.19   539386.0  4.986951e+08\n",
      "2019-01-03 000001   9.18   9.33   9.15   9.28   415537.0  3.844577e+08\n",
      "2019-01-04 000001   9.24   9.82   9.22   9.75  1481159.0  1.422150e+09\n",
      "2019-01-07 000001   9.84   9.85   9.63   9.74   865687.0  8.411664e+08\n",
      "2019-01-08 000001   9.73   9.74   9.62   9.66   402388.0  3.892478e+08\n",
      "2019-01-09 000001   9.74  10.08   9.70   9.94  1233486.0  1.229465e+09\n",
      "2019-01-10 000001   9.87  10.20   9.86  10.10  1071817.0  1.079711e+09\n",
      "2019-01-11 000001  10.11  10.22  10.05  10.20   696364.0  7.080018e+08\n",
      "2019-01-14 000001  10.22  10.25  10.07  10.11   500443.0  5.078629e+08\n",
      "2019-01-15 000001  10.11  10.28  10.09  10.24   542160.0  5.530273e+08\n",
      "2019-01-16 000001  10.24  10.50  10.23  10.48   977699.0  1.017495e+09\n",
      "2019-01-17 000001  10.54  10.57  10.17  10.25   882811.0  9.102121e+08\n",
      "000001\n",
      "---------------under is 账户情况和持仓情况 -------------------\n",
      "{'code': '000001', 'instrument_id': '000001', 'user_id': 'x', 'portfolio_cookie': 'default', 'username': 'quantaxis', 'position_id': 'd2b24d5c-fb1e-4a2e-97eb-f19b04f544ec', 'account_cookie': 'x', 'frozen': {}, 'name': None, 'spms_id': None, 'oms_id': None, 'market_type': 'stock_cn', 'exchange_id': None, 'moneypreset': 100000, 'moneypresetLeft': 100000, 'lastupdatetime': '', 'volume_long_today': 7000, 'volume_long_his': 0, 'volume_long': 7000, 'volume_short_today': 0, 'volume_short_his': 0, 'volume_short': 0, 'volume_long_frozen_today': 0, 'volume_long_frozen_his': 0, 'volume_long_frozen': 0, 'volume_short_frozen_today': 0, 'volume_short_frozen_his': 0, 'volume_short_frozen': 0, 'margin_long': 68690.0, 'margin_short': 0, 'margin': 68690.0, 'position_price_long': 9.812857142857142, 'position_cost_long': 68690.0, 'position_price_short': 0, 'position_cost_short': 0, 'open_price_long': 9.812857142857142, 'open_cost_long': 68690.0, 'open_price_short': 0, 'open_cost_short': 0, 'trades': [], 'orders': {}, 'last_price': 10.25, 'float_profit_long': 3060.0, 'float_profit_short': 0.0, 'float_profit': 3060.0, 'position_profit_long': 3060.0, 'position_profit_short': 0.0, 'position_profit': 3060.0}\n",
      "               datetime    code  price  amount          cash  \\\n",
      "0   2019-01-02 00:00:00  000001   9.19    1000  9.908050e+05   \n",
      "1   2019-01-02 00:00:00  000002  23.90    1000  9.668990e+05   \n",
      "2   2019-01-03 00:00:00  000001   9.28    1000  9.576140e+05   \n",
      "3   2019-01-03 00:00:00  000002  24.07   -1000  9.816539e+05   \n",
      "4   2019-01-04 00:00:00  000001   9.75   -2000  1.001129e+06   \n",
      "5   2019-01-04 00:00:00  000002  24.93    1000  9.761932e+05   \n",
      "6   2019-01-07 00:00:00  000001   9.74    1000  9.664482e+05   \n",
      "7   2019-01-07 00:00:00  000002  25.05   -2000  1.016486e+06   \n",
      "8   2019-01-08 00:00:00  000001   9.66   -3000  1.045429e+06   \n",
      "9   2019-01-08 00:00:00  000002  25.00   -2000  1.095367e+06   \n",
      "10  2019-01-09 00:00:00  000001   9.94    1000  1.085422e+06   \n",
      "11  2019-01-09 00:00:00  000002  25.33    1000  1.060086e+06   \n",
      "12  2019-01-10 00:00:00  000001  10.10    1000  1.049981e+06   \n",
      "13  2019-01-10 00:00:00  000002  25.11    1000  1.024864e+06   \n",
      "14  2019-01-11 00:00:00  000001  10.20    1000  1.014659e+06   \n",
      "15  2019-01-11 00:00:00  000002  25.30   -4000  1.115733e+06   \n",
      "16  2019-01-14 00:00:00  000001  10.11   -6000  1.176317e+06   \n",
      "17  2019-01-14 00:00:00  000002  25.02    1000  1.151291e+06   \n",
      "18  2019-01-15 00:00:00  000001  10.24    1000  1.141046e+06   \n",
      "19  2019-01-15 00:00:00  000002  25.16   -5000  1.266688e+06   \n",
      "20  2019-01-16 00:00:00  000001  10.48   -7000  1.339957e+06   \n",
      "21  2019-01-16 00:00:00  000002  25.42    1000  1.314530e+06   \n",
      "22  2019-01-17 00:00:00  000001  10.25   -7000  1.386191e+06   \n",
      "\n",
      "                                order_id realorder_id trade_id account_cookie  \\\n",
      "0   e23f9e01-e8d2-4a05-93ef-9163ce7a83ee         None     None              x   \n",
      "1   1f430faa-86d1-440b-abf7-a7feddc17954         None     None              x   \n",
      "2   0230d608-91cc-422e-8deb-218f4faef3d7         None     None              x   \n",
      "3   427f1eed-b3bd-4078-94e3-156bf3ae21a6         None     None              x   \n",
      "4   48fd88b8-e3c0-4df5-94ef-62b936345bd9         None     None              x   \n",
      "5   d9aff179-9bc3-4268-b2d5-37eee8de309f         None     None              x   \n",
      "6   41f23955-b920-4f04-bcb7-ca1cd960aa45         None     None              x   \n",
      "7   cb2fdd74-7326-41d9-812f-9d88da447741         None     None              x   \n",
      "8   8ef82ee7-87b8-4f7d-8a01-374f52b60cbb         None     None              x   \n",
      "9   1f63fa52-f56b-4814-8eb3-5e4de849f3cb         None     None              x   \n",
      "10  13e77d45-9e2c-4ef3-89f5-7fa63cc3b808         None     None              x   \n",
      "11  7e714c35-83a4-4cb4-8ab5-d4fb2b31ccb7         None     None              x   \n",
      "12  380f932e-7871-4c72-94d3-5077861c9f53         None     None              x   \n",
      "13  3966e418-9017-4565-b24f-ed9455ef5593         None     None              x   \n",
      "14  99048106-f032-45a2-92c6-5a076f899a8a         None     None              x   \n",
      "15  3529f52a-3c09-46fc-944d-b3c619af7cd7         None     None              x   \n",
      "16  650c29d4-459c-412a-8000-c881af3c662a         None     None              x   \n",
      "17  9d0b7e50-53ac-42df-9175-c3f303387629         None     None              x   \n",
      "18  80ac049d-602e-44ff-a799-3be84acdfe55         None     None              x   \n",
      "19  e354ff47-4298-4d5a-a22e-794e327dee61         None     None              x   \n",
      "20  4977e6e3-e6ee-4d8c-8c43-9b1f027e07b1         None     None              x   \n",
      "21  16d8792c-b2f0-400d-b2a6-aa5c2e473728         None     None              x   \n",
      "22  eff96ddf-6dbb-4af3-a7bd-1f170e632dbc         None     None              x   \n",
      "\n",
      "    commission     tax message  frozen  direction  total_frozen  \n",
      "0       5.0000    0.00    None       0          1             0  \n",
      "1       5.9750    0.00    None       0          1             0  \n",
      "2       5.0000    0.00    None       0          1             0  \n",
      "3       6.0175   24.07    None       0         -1             0  \n",
      "4       5.0000   19.50    None       0         -1             0  \n",
      "5       6.2325    0.00    None       0          1             0  \n",
      "6       5.0000    0.00    None       0          1             0  \n",
      "7      12.5250   50.10    None       0         -1             0  \n",
      "8       7.2450   28.98    None       0         -1             0  \n",
      "9      12.5000   50.00    None       0         -1             0  \n",
      "10      5.0000    0.00    None       0          1             0  \n",
      "11      6.3325    0.00    None       0          1             0  \n",
      "12      5.0000    0.00    None       0          1             0  \n",
      "13      6.2775    0.00    None       0          1             0  \n",
      "14      5.0000    0.00    None       0          1             0  \n",
      "15     25.3000  101.20    None       0         -1             0  \n",
      "16     15.1650   60.66    None       0         -1             0  \n",
      "17      6.2550    0.00    None       0          1             0  \n",
      "18      5.0000    0.00    None       0          1             0  \n",
      "19     31.4500  125.80    None       0         -1             0  \n",
      "20     18.3400   73.36    None       0         -1             0  \n",
      "21      6.3550    0.00    None       0          1             0  \n",
      "22     17.9375   71.75    None       0         -1             0  \n"
     ]
    },
    {
     "name": "stdin",
     "output_type": "stream",
     "text": [
      " \n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "open      2.550000e+01\n",
      "high      2.550000e+01\n",
      "low       2.494000e+01\n",
      "close     2.497000e+01\n",
      "volume    2.458950e+05\n",
      "amount    6.188767e+08\n",
      "Name: (2019-01-17 00:00:00, 000002), dtype: float64\n",
      "---------------under is 当前全市场的market_data --------------\n",
      "                    open   high    low  close    volume       amount\n",
      "2019-01-17 000001  10.54  10.57  10.17  10.25  882811.0  910212096.0\n",
      "           000002  25.50  25.50  24.94  24.97  245895.0  618876736.0\n",
      "---------------under is 当前品种的market_data --------------\n",
      "                    open   high    low  close    volume        amount\n",
      "2019-01-02 000002  23.83  24.09  23.67  23.90  247010.0  5.893846e+08\n",
      "2019-01-03 000002  23.79  24.50  23.71  24.07  222353.0  5.363333e+08\n",
      "2019-01-04 000002  23.91  25.00  23.85  24.93  377727.0  9.270117e+08\n",
      "2019-01-07 000002  25.29  25.53  24.99  25.05  427154.0  1.077909e+09\n",
      "2019-01-08 000002  25.05  25.20  24.63  25.00  214382.0  5.336044e+08\n",
      "2019-01-09 000002  25.40  25.88  25.11  25.33  340140.0  8.670814e+08\n",
      "2019-01-10 000002  25.22  25.56  25.03  25.11  224649.0  5.689526e+08\n",
      "2019-01-11 000002  25.10  25.54  25.01  25.30  240694.0  6.069947e+08\n",
      "2019-01-14 000002  25.13  25.30  24.92  25.02  183281.0  4.591518e+08\n",
      "2019-01-15 000002  25.00  25.16  24.32  25.16  368758.0  9.149835e+08\n",
      "2019-01-16 000002  25.15  25.50  24.83  25.42  267466.0  6.766856e+08\n",
      "2019-01-17 000002  25.50  25.50  24.94  24.97  245895.0  6.188767e+08\n",
      "000002\n",
      "---------------under is 账户情况和持仓情况 -------------------\n",
      "{'code': '000002', 'instrument_id': '000002', 'user_id': 'x', 'portfolio_cookie': 'default', 'username': 'quantaxis', 'position_id': '5aa694d0-3861-43a8-9efc-84f380138bea', 'account_cookie': 'x', 'frozen': {}, 'name': None, 'spms_id': None, 'oms_id': None, 'market_type': 'stock_cn', 'exchange_id': None, 'moneypreset': 100000, 'moneypresetLeft': 100000, 'lastupdatetime': '', 'volume_long_today': 7000, 'volume_long_his': 0, 'volume_long': 7000, 'volume_short_today': 0, 'volume_short_his': 0, 'volume_short': 0, 'volume_long_frozen_today': 0, 'volume_long_frozen_his': 0, 'volume_long_frozen': 0, 'volume_short_frozen_today': 0, 'volume_short_frozen_his': 0, 'volume_short_frozen': 0, 'margin_long': 174680.0, 'margin_short': 0, 'margin': 174680.0, 'position_price_long': 24.954285714285714, 'position_cost_long': 174680.0, 'position_price_short': 0, 'position_cost_short': 0, 'open_price_long': 24.954285714285714, 'open_cost_long': 174680.0, 'open_price_short': 0, 'open_cost_short': 0, 'trades': [], 'orders': {}, 'last_price': 24.97, 'float_profit_long': 110.0, 'float_profit_short': 0.0, 'float_profit': 110.0, 'position_profit_long': 110.0, 'position_profit_short': 0.0, 'position_profit': 110.0}\n",
      "               datetime    code  price  amount          cash  \\\n",
      "0   2019-01-02 00:00:00  000001   9.19    1000  9.908050e+05   \n",
      "1   2019-01-02 00:00:00  000002  23.90    1000  9.668990e+05   \n",
      "2   2019-01-03 00:00:00  000001   9.28    1000  9.576140e+05   \n",
      "3   2019-01-03 00:00:00  000002  24.07   -1000  9.816539e+05   \n",
      "4   2019-01-04 00:00:00  000001   9.75   -2000  1.001129e+06   \n",
      "5   2019-01-04 00:00:00  000002  24.93    1000  9.761932e+05   \n",
      "6   2019-01-07 00:00:00  000001   9.74    1000  9.664482e+05   \n",
      "7   2019-01-07 00:00:00  000002  25.05   -2000  1.016486e+06   \n",
      "8   2019-01-08 00:00:00  000001   9.66   -3000  1.045429e+06   \n",
      "9   2019-01-08 00:00:00  000002  25.00   -2000  1.095367e+06   \n",
      "10  2019-01-09 00:00:00  000001   9.94    1000  1.085422e+06   \n",
      "11  2019-01-09 00:00:00  000002  25.33    1000  1.060086e+06   \n",
      "12  2019-01-10 00:00:00  000001  10.10    1000  1.049981e+06   \n",
      "13  2019-01-10 00:00:00  000002  25.11    1000  1.024864e+06   \n",
      "14  2019-01-11 00:00:00  000001  10.20    1000  1.014659e+06   \n",
      "15  2019-01-11 00:00:00  000002  25.30   -4000  1.115733e+06   \n",
      "16  2019-01-14 00:00:00  000001  10.11   -6000  1.176317e+06   \n",
      "17  2019-01-14 00:00:00  000002  25.02    1000  1.151291e+06   \n",
      "18  2019-01-15 00:00:00  000001  10.24    1000  1.141046e+06   \n",
      "19  2019-01-15 00:00:00  000002  25.16   -5000  1.266688e+06   \n",
      "20  2019-01-16 00:00:00  000001  10.48   -7000  1.339957e+06   \n",
      "21  2019-01-16 00:00:00  000002  25.42    1000  1.314530e+06   \n",
      "22  2019-01-17 00:00:00  000001  10.25   -7000  1.386191e+06   \n",
      "23  2019-01-17 00:00:00  000002  24.97    1000  1.361214e+06   \n",
      "\n",
      "                                order_id realorder_id trade_id account_cookie  \\\n",
      "0   e23f9e01-e8d2-4a05-93ef-9163ce7a83ee         None     None              x   \n",
      "1   1f430faa-86d1-440b-abf7-a7feddc17954         None     None              x   \n",
      "2   0230d608-91cc-422e-8deb-218f4faef3d7         None     None              x   \n",
      "3   427f1eed-b3bd-4078-94e3-156bf3ae21a6         None     None              x   \n",
      "4   48fd88b8-e3c0-4df5-94ef-62b936345bd9         None     None              x   \n",
      "5   d9aff179-9bc3-4268-b2d5-37eee8de309f         None     None              x   \n",
      "6   41f23955-b920-4f04-bcb7-ca1cd960aa45         None     None              x   \n",
      "7   cb2fdd74-7326-41d9-812f-9d88da447741         None     None              x   \n",
      "8   8ef82ee7-87b8-4f7d-8a01-374f52b60cbb         None     None              x   \n",
      "9   1f63fa52-f56b-4814-8eb3-5e4de849f3cb         None     None              x   \n",
      "10  13e77d45-9e2c-4ef3-89f5-7fa63cc3b808         None     None              x   \n",
      "11  7e714c35-83a4-4cb4-8ab5-d4fb2b31ccb7         None     None              x   \n",
      "12  380f932e-7871-4c72-94d3-5077861c9f53         None     None              x   \n",
      "13  3966e418-9017-4565-b24f-ed9455ef5593         None     None              x   \n",
      "14  99048106-f032-45a2-92c6-5a076f899a8a         None     None              x   \n",
      "15  3529f52a-3c09-46fc-944d-b3c619af7cd7         None     None              x   \n",
      "16  650c29d4-459c-412a-8000-c881af3c662a         None     None              x   \n",
      "17  9d0b7e50-53ac-42df-9175-c3f303387629         None     None              x   \n",
      "18  80ac049d-602e-44ff-a799-3be84acdfe55         None     None              x   \n",
      "19  e354ff47-4298-4d5a-a22e-794e327dee61         None     None              x   \n",
      "20  4977e6e3-e6ee-4d8c-8c43-9b1f027e07b1         None     None              x   \n",
      "21  16d8792c-b2f0-400d-b2a6-aa5c2e473728         None     None              x   \n",
      "22  eff96ddf-6dbb-4af3-a7bd-1f170e632dbc         None     None              x   \n",
      "23  7b21c653-d1d1-44d8-9772-790585915ae4         None     None              x   \n",
      "\n",
      "    commission     tax message  frozen  direction  total_frozen  \n",
      "0       5.0000    0.00    None       0          1             0  \n",
      "1       5.9750    0.00    None       0          1             0  \n",
      "2       5.0000    0.00    None       0          1             0  \n",
      "3       6.0175   24.07    None       0         -1             0  \n",
      "4       5.0000   19.50    None       0         -1             0  \n",
      "5       6.2325    0.00    None       0          1             0  \n",
      "6       5.0000    0.00    None       0          1             0  \n",
      "7      12.5250   50.10    None       0         -1             0  \n",
      "8       7.2450   28.98    None       0         -1             0  \n",
      "9      12.5000   50.00    None       0         -1             0  \n",
      "10      5.0000    0.00    None       0          1             0  \n",
      "11      6.3325    0.00    None       0          1             0  \n",
      "12      5.0000    0.00    None       0          1             0  \n",
      "13      6.2775    0.00    None       0          1             0  \n",
      "14      5.0000    0.00    None       0          1             0  \n",
      "15     25.3000  101.20    None       0         -1             0  \n",
      "16     15.1650   60.66    None       0         -1             0  \n",
      "17      6.2550    0.00    None       0          1             0  \n",
      "18      5.0000    0.00    None       0          1             0  \n",
      "19     31.4500  125.80    None       0         -1             0  \n",
      "20     18.3400   73.36    None       0         -1             0  \n",
      "21      6.3550    0.00    None       0          1             0  \n",
      "22     17.9375   71.75    None       0         -1             0  \n",
      "23      6.2425    0.00    None       0          1             0  \n"
     ]
    },
    {
     "name": "stdin",
     "output_type": "stream",
     "text": [
      " \n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "backtest: Settle!\n",
      "open      1.034000e+01\n",
      "high      1.049000e+01\n",
      "low       1.028000e+01\n",
      "close     1.043000e+01\n",
      "volume    7.387930e+05\n",
      "amount    7.699736e+08\n",
      "Name: (2019-01-18 00:00:00, 000001), dtype: float64\n",
      "---------------under is 当前全市场的market_data --------------\n",
      "                    open   high    low  close    volume       amount\n",
      "2019-01-18 000001  10.34  10.49  10.28  10.43  738793.0  769973632.0\n",
      "---------------under is 当前品种的market_data --------------\n",
      "                    open   high    low  close     volume        amount\n",
      "2019-01-02 000001   9.39   9.42   9.16   9.19   539386.0  4.986951e+08\n",
      "2019-01-03 000001   9.18   9.33   9.15   9.28   415537.0  3.844577e+08\n",
      "2019-01-04 000001   9.24   9.82   9.22   9.75  1481159.0  1.422150e+09\n",
      "2019-01-07 000001   9.84   9.85   9.63   9.74   865687.0  8.411664e+08\n",
      "2019-01-08 000001   9.73   9.74   9.62   9.66   402388.0  3.892478e+08\n",
      "2019-01-09 000001   9.74  10.08   9.70   9.94  1233486.0  1.229465e+09\n",
      "2019-01-10 000001   9.87  10.20   9.86  10.10  1071817.0  1.079711e+09\n",
      "2019-01-11 000001  10.11  10.22  10.05  10.20   696364.0  7.080018e+08\n",
      "2019-01-14 000001  10.22  10.25  10.07  10.11   500443.0  5.078629e+08\n",
      "2019-01-15 000001  10.11  10.28  10.09  10.24   542160.0  5.530273e+08\n",
      "2019-01-16 000001  10.24  10.50  10.23  10.48   977699.0  1.017495e+09\n",
      "2019-01-17 000001  10.54  10.57  10.17  10.25   882811.0  9.102121e+08\n",
      "2019-01-18 000001  10.34  10.49  10.28  10.43   738793.0  7.699736e+08\n",
      "000001\n",
      "---------------under is 账户情况和持仓情况 -------------------\n",
      "{'code': '000001', 'instrument_id': '000001', 'user_id': 'x', 'portfolio_cookie': 'default', 'username': 'quantaxis', 'position_id': 'd2b24d5c-fb1e-4a2e-97eb-f19b04f544ec', 'account_cookie': 'x', 'frozen': {}, 'name': None, 'spms_id': None, 'oms_id': None, 'market_type': 'stock_cn', 'exchange_id': None, 'moneypreset': 100000, 'moneypresetLeft': 100000, 'lastupdatetime': '', 'volume_long_today': 8000, 'volume_long_his': 0, 'volume_long': 8000, 'volume_short_today': 0, 'volume_short_his': 0, 'volume_short': 0, 'volume_long_frozen_today': 0, 'volume_long_frozen_his': 0, 'volume_long_frozen': 0, 'volume_short_frozen_today': 0, 'volume_short_frozen_his': 0, 'volume_short_frozen': 0, 'margin_long': 79120.0, 'margin_short': 0, 'margin': 79120.0, 'position_price_long': 9.89, 'position_cost_long': 79120.0, 'position_price_short': 0, 'position_cost_short': 0, 'open_price_long': 9.89, 'open_cost_long': 79120.0, 'open_price_short': 0, 'open_cost_short': 0, 'trades': [], 'orders': {}, 'last_price': 10.43, 'float_profit_long': 4320.0, 'float_profit_short': 0.0, 'float_profit': 4320.0, 'position_profit_long': 4320.0, 'position_profit_short': 0.0, 'position_profit': 4320.0}\n",
      "               datetime    code  price  amount          cash  \\\n",
      "0   2019-01-02 00:00:00  000001   9.19    1000  9.908050e+05   \n",
      "1   2019-01-02 00:00:00  000002  23.90    1000  9.668990e+05   \n",
      "2   2019-01-03 00:00:00  000001   9.28    1000  9.576140e+05   \n",
      "3   2019-01-03 00:00:00  000002  24.07   -1000  9.816539e+05   \n",
      "4   2019-01-04 00:00:00  000001   9.75   -2000  1.001129e+06   \n",
      "5   2019-01-04 00:00:00  000002  24.93    1000  9.761932e+05   \n",
      "6   2019-01-07 00:00:00  000001   9.74    1000  9.664482e+05   \n",
      "7   2019-01-07 00:00:00  000002  25.05   -2000  1.016486e+06   \n",
      "8   2019-01-08 00:00:00  000001   9.66   -3000  1.045429e+06   \n",
      "9   2019-01-08 00:00:00  000002  25.00   -2000  1.095367e+06   \n",
      "10  2019-01-09 00:00:00  000001   9.94    1000  1.085422e+06   \n",
      "11  2019-01-09 00:00:00  000002  25.33    1000  1.060086e+06   \n",
      "12  2019-01-10 00:00:00  000001  10.10    1000  1.049981e+06   \n",
      "13  2019-01-10 00:00:00  000002  25.11    1000  1.024864e+06   \n",
      "14  2019-01-11 00:00:00  000001  10.20    1000  1.014659e+06   \n",
      "15  2019-01-11 00:00:00  000002  25.30   -4000  1.115733e+06   \n",
      "16  2019-01-14 00:00:00  000001  10.11   -6000  1.176317e+06   \n",
      "17  2019-01-14 00:00:00  000002  25.02    1000  1.151291e+06   \n",
      "18  2019-01-15 00:00:00  000001  10.24    1000  1.141046e+06   \n",
      "19  2019-01-15 00:00:00  000002  25.16   -5000  1.266688e+06   \n",
      "20  2019-01-16 00:00:00  000001  10.48   -7000  1.339957e+06   \n",
      "21  2019-01-16 00:00:00  000002  25.42    1000  1.314530e+06   \n",
      "22  2019-01-17 00:00:00  000001  10.25   -7000  1.386191e+06   \n",
      "23  2019-01-17 00:00:00  000002  24.97    1000  1.361214e+06   \n",
      "24  2019-01-18 00:00:00  000001  10.43    1000  1.350779e+06   \n",
      "\n",
      "                                order_id realorder_id trade_id account_cookie  \\\n",
      "0   e23f9e01-e8d2-4a05-93ef-9163ce7a83ee         None     None              x   \n",
      "1   1f430faa-86d1-440b-abf7-a7feddc17954         None     None              x   \n",
      "2   0230d608-91cc-422e-8deb-218f4faef3d7         None     None              x   \n",
      "3   427f1eed-b3bd-4078-94e3-156bf3ae21a6         None     None              x   \n",
      "4   48fd88b8-e3c0-4df5-94ef-62b936345bd9         None     None              x   \n",
      "5   d9aff179-9bc3-4268-b2d5-37eee8de309f         None     None              x   \n",
      "6   41f23955-b920-4f04-bcb7-ca1cd960aa45         None     None              x   \n",
      "7   cb2fdd74-7326-41d9-812f-9d88da447741         None     None              x   \n",
      "8   8ef82ee7-87b8-4f7d-8a01-374f52b60cbb         None     None              x   \n",
      "9   1f63fa52-f56b-4814-8eb3-5e4de849f3cb         None     None              x   \n",
      "10  13e77d45-9e2c-4ef3-89f5-7fa63cc3b808         None     None              x   \n",
      "11  7e714c35-83a4-4cb4-8ab5-d4fb2b31ccb7         None     None              x   \n",
      "12  380f932e-7871-4c72-94d3-5077861c9f53         None     None              x   \n",
      "13  3966e418-9017-4565-b24f-ed9455ef5593         None     None              x   \n",
      "14  99048106-f032-45a2-92c6-5a076f899a8a         None     None              x   \n",
      "15  3529f52a-3c09-46fc-944d-b3c619af7cd7         None     None              x   \n",
      "16  650c29d4-459c-412a-8000-c881af3c662a         None     None              x   \n",
      "17  9d0b7e50-53ac-42df-9175-c3f303387629         None     None              x   \n",
      "18  80ac049d-602e-44ff-a799-3be84acdfe55         None     None              x   \n",
      "19  e354ff47-4298-4d5a-a22e-794e327dee61         None     None              x   \n",
      "20  4977e6e3-e6ee-4d8c-8c43-9b1f027e07b1         None     None              x   \n",
      "21  16d8792c-b2f0-400d-b2a6-aa5c2e473728         None     None              x   \n",
      "22  eff96ddf-6dbb-4af3-a7bd-1f170e632dbc         None     None              x   \n",
      "23  7b21c653-d1d1-44d8-9772-790585915ae4         None     None              x   \n",
      "24  dfe8fbac-ff27-4746-a53a-f6220f3c63a6         None     None              x   \n",
      "\n",
      "    commission     tax message  frozen  direction  total_frozen  \n",
      "0       5.0000    0.00    None       0          1             0  \n",
      "1       5.9750    0.00    None       0          1             0  \n",
      "2       5.0000    0.00    None       0          1             0  \n",
      "3       6.0175   24.07    None       0         -1             0  \n",
      "4       5.0000   19.50    None       0         -1             0  \n",
      "5       6.2325    0.00    None       0          1             0  \n",
      "6       5.0000    0.00    None       0          1             0  \n",
      "7      12.5250   50.10    None       0         -1             0  \n",
      "8       7.2450   28.98    None       0         -1             0  \n",
      "9      12.5000   50.00    None       0         -1             0  \n",
      "10      5.0000    0.00    None       0          1             0  \n",
      "11      6.3325    0.00    None       0          1             0  \n",
      "12      5.0000    0.00    None       0          1             0  \n",
      "13      6.2775    0.00    None       0          1             0  \n",
      "14      5.0000    0.00    None       0          1             0  \n",
      "15     25.3000  101.20    None       0         -1             0  \n",
      "16     15.1650   60.66    None       0         -1             0  \n",
      "17      6.2550    0.00    None       0          1             0  \n",
      "18      5.0000    0.00    None       0          1             0  \n",
      "19     31.4500  125.80    None       0         -1             0  \n",
      "20     18.3400   73.36    None       0         -1             0  \n",
      "21      6.3550    0.00    None       0          1             0  \n",
      "22     17.9375   71.75    None       0         -1             0  \n",
      "23      6.2425    0.00    None       0          1             0  \n",
      "24      5.0000    0.00    None       0          1             0  \n"
     ]
    },
    {
     "name": "stdin",
     "output_type": "stream",
     "text": [
      " \n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "open      2.500000e+01\n",
      "high      2.576000e+01\n",
      "low       2.499000e+01\n",
      "close     2.576000e+01\n",
      "volume    3.657230e+05\n",
      "amount    9.334642e+08\n",
      "Name: (2019-01-18 00:00:00, 000002), dtype: float64\n",
      "---------------under is 当前全市场的market_data --------------\n",
      "                    open   high    low  close    volume       amount\n",
      "2019-01-18 000001  10.34  10.49  10.28  10.43  738793.0  769973632.0\n",
      "           000002  25.00  25.76  24.99  25.76  365723.0  933464192.0\n",
      "---------------under is 当前品种的market_data --------------\n",
      "                    open   high    low  close    volume        amount\n",
      "2019-01-02 000002  23.83  24.09  23.67  23.90  247010.0  5.893846e+08\n",
      "2019-01-03 000002  23.79  24.50  23.71  24.07  222353.0  5.363333e+08\n",
      "2019-01-04 000002  23.91  25.00  23.85  24.93  377727.0  9.270117e+08\n",
      "2019-01-07 000002  25.29  25.53  24.99  25.05  427154.0  1.077909e+09\n",
      "2019-01-08 000002  25.05  25.20  24.63  25.00  214382.0  5.336044e+08\n",
      "2019-01-09 000002  25.40  25.88  25.11  25.33  340140.0  8.670814e+08\n",
      "2019-01-10 000002  25.22  25.56  25.03  25.11  224649.0  5.689526e+08\n",
      "2019-01-11 000002  25.10  25.54  25.01  25.30  240694.0  6.069947e+08\n",
      "2019-01-14 000002  25.13  25.30  24.92  25.02  183281.0  4.591518e+08\n",
      "2019-01-15 000002  25.00  25.16  24.32  25.16  368758.0  9.149835e+08\n",
      "2019-01-16 000002  25.15  25.50  24.83  25.42  267466.0  6.766856e+08\n",
      "2019-01-17 000002  25.50  25.50  24.94  24.97  245895.0  6.188767e+08\n",
      "2019-01-18 000002  25.00  25.76  24.99  25.76  365723.0  9.334642e+08\n",
      "000002\n",
      "---------------under is 账户情况和持仓情况 -------------------\n",
      "{'code': '000002', 'instrument_id': '000002', 'user_id': 'x', 'portfolio_cookie': 'default', 'username': 'quantaxis', 'position_id': '5aa694d0-3861-43a8-9efc-84f380138bea', 'account_cookie': 'x', 'frozen': {}, 'name': None, 'spms_id': None, 'oms_id': None, 'market_type': 'stock_cn', 'exchange_id': None, 'moneypreset': 100000, 'moneypresetLeft': 100000, 'lastupdatetime': '', 'volume_long_today': 8000, 'volume_long_his': 0, 'volume_long': 8000, 'volume_short_today': 0, 'volume_short_his': 0, 'volume_short': 0, 'volume_long_frozen_today': 0, 'volume_long_frozen_his': 0, 'volume_long_frozen': 0, 'volume_short_frozen_today': 0, 'volume_short_frozen_his': 0, 'volume_short_frozen': 0, 'margin_long': 200440.0, 'margin_short': 0, 'margin': 200440.0, 'position_price_long': 25.055, 'position_cost_long': 200440.0, 'position_price_short': 0, 'position_cost_short': 0, 'open_price_long': 25.055, 'open_cost_long': 200440.0, 'open_price_short': 0, 'open_cost_short': 0, 'trades': [], 'orders': {}, 'last_price': 25.76, 'float_profit_long': 5640.0, 'float_profit_short': 0.0, 'float_profit': 5640.0, 'position_profit_long': 5640.0, 'position_profit_short': 0.0, 'position_profit': 5640.0}\n",
      "               datetime    code  price  amount          cash  \\\n",
      "0   2019-01-02 00:00:00  000001   9.19    1000  9.908050e+05   \n",
      "1   2019-01-02 00:00:00  000002  23.90    1000  9.668990e+05   \n",
      "2   2019-01-03 00:00:00  000001   9.28    1000  9.576140e+05   \n",
      "3   2019-01-03 00:00:00  000002  24.07   -1000  9.816539e+05   \n",
      "4   2019-01-04 00:00:00  000001   9.75   -2000  1.001129e+06   \n",
      "5   2019-01-04 00:00:00  000002  24.93    1000  9.761932e+05   \n",
      "6   2019-01-07 00:00:00  000001   9.74    1000  9.664482e+05   \n",
      "7   2019-01-07 00:00:00  000002  25.05   -2000  1.016486e+06   \n",
      "8   2019-01-08 00:00:00  000001   9.66   -3000  1.045429e+06   \n",
      "9   2019-01-08 00:00:00  000002  25.00   -2000  1.095367e+06   \n",
      "10  2019-01-09 00:00:00  000001   9.94    1000  1.085422e+06   \n",
      "11  2019-01-09 00:00:00  000002  25.33    1000  1.060086e+06   \n",
      "12  2019-01-10 00:00:00  000001  10.10    1000  1.049981e+06   \n",
      "13  2019-01-10 00:00:00  000002  25.11    1000  1.024864e+06   \n",
      "14  2019-01-11 00:00:00  000001  10.20    1000  1.014659e+06   \n",
      "15  2019-01-11 00:00:00  000002  25.30   -4000  1.115733e+06   \n",
      "16  2019-01-14 00:00:00  000001  10.11   -6000  1.176317e+06   \n",
      "17  2019-01-14 00:00:00  000002  25.02    1000  1.151291e+06   \n",
      "18  2019-01-15 00:00:00  000001  10.24    1000  1.141046e+06   \n",
      "19  2019-01-15 00:00:00  000002  25.16   -5000  1.266688e+06   \n",
      "20  2019-01-16 00:00:00  000001  10.48   -7000  1.339957e+06   \n",
      "21  2019-01-16 00:00:00  000002  25.42    1000  1.314530e+06   \n",
      "22  2019-01-17 00:00:00  000001  10.25   -7000  1.386191e+06   \n",
      "23  2019-01-17 00:00:00  000002  24.97    1000  1.361214e+06   \n",
      "24  2019-01-18 00:00:00  000001  10.43    1000  1.350779e+06   \n",
      "25  2019-01-18 00:00:00  000002  25.76    1000  1.325013e+06   \n",
      "\n",
      "                                order_id realorder_id trade_id account_cookie  \\\n",
      "0   e23f9e01-e8d2-4a05-93ef-9163ce7a83ee         None     None              x   \n",
      "1   1f430faa-86d1-440b-abf7-a7feddc17954         None     None              x   \n",
      "2   0230d608-91cc-422e-8deb-218f4faef3d7         None     None              x   \n",
      "3   427f1eed-b3bd-4078-94e3-156bf3ae21a6         None     None              x   \n",
      "4   48fd88b8-e3c0-4df5-94ef-62b936345bd9         None     None              x   \n",
      "5   d9aff179-9bc3-4268-b2d5-37eee8de309f         None     None              x   \n",
      "6   41f23955-b920-4f04-bcb7-ca1cd960aa45         None     None              x   \n",
      "7   cb2fdd74-7326-41d9-812f-9d88da447741         None     None              x   \n",
      "8   8ef82ee7-87b8-4f7d-8a01-374f52b60cbb         None     None              x   \n",
      "9   1f63fa52-f56b-4814-8eb3-5e4de849f3cb         None     None              x   \n",
      "10  13e77d45-9e2c-4ef3-89f5-7fa63cc3b808         None     None              x   \n",
      "11  7e714c35-83a4-4cb4-8ab5-d4fb2b31ccb7         None     None              x   \n",
      "12  380f932e-7871-4c72-94d3-5077861c9f53         None     None              x   \n",
      "13  3966e418-9017-4565-b24f-ed9455ef5593         None     None              x   \n",
      "14  99048106-f032-45a2-92c6-5a076f899a8a         None     None              x   \n",
      "15  3529f52a-3c09-46fc-944d-b3c619af7cd7         None     None              x   \n",
      "16  650c29d4-459c-412a-8000-c881af3c662a         None     None              x   \n",
      "17  9d0b7e50-53ac-42df-9175-c3f303387629         None     None              x   \n",
      "18  80ac049d-602e-44ff-a799-3be84acdfe55         None     None              x   \n",
      "19  e354ff47-4298-4d5a-a22e-794e327dee61         None     None              x   \n",
      "20  4977e6e3-e6ee-4d8c-8c43-9b1f027e07b1         None     None              x   \n",
      "21  16d8792c-b2f0-400d-b2a6-aa5c2e473728         None     None              x   \n",
      "22  eff96ddf-6dbb-4af3-a7bd-1f170e632dbc         None     None              x   \n",
      "23  7b21c653-d1d1-44d8-9772-790585915ae4         None     None              x   \n",
      "24  dfe8fbac-ff27-4746-a53a-f6220f3c63a6         None     None              x   \n",
      "25  98e05d3a-cdf5-4cac-bd41-fa747e29a2a4         None     None              x   \n",
      "\n",
      "    commission     tax message  frozen  direction  total_frozen  \n",
      "0       5.0000    0.00    None       0          1             0  \n",
      "1       5.9750    0.00    None       0          1             0  \n",
      "2       5.0000    0.00    None       0          1             0  \n",
      "3       6.0175   24.07    None       0         -1             0  \n",
      "4       5.0000   19.50    None       0         -1             0  \n",
      "5       6.2325    0.00    None       0          1             0  \n",
      "6       5.0000    0.00    None       0          1             0  \n",
      "7      12.5250   50.10    None       0         -1             0  \n",
      "8       7.2450   28.98    None       0         -1             0  \n",
      "9      12.5000   50.00    None       0         -1             0  \n",
      "10      5.0000    0.00    None       0          1             0  \n",
      "11      6.3325    0.00    None       0          1             0  \n",
      "12      5.0000    0.00    None       0          1             0  \n",
      "13      6.2775    0.00    None       0          1             0  \n",
      "14      5.0000    0.00    None       0          1             0  \n",
      "15     25.3000  101.20    None       0         -1             0  \n",
      "16     15.1650   60.66    None       0         -1             0  \n",
      "17      6.2550    0.00    None       0          1             0  \n",
      "18      5.0000    0.00    None       0          1             0  \n",
      "19     31.4500  125.80    None       0         -1             0  \n",
      "20     18.3400   73.36    None       0         -1             0  \n",
      "21      6.3550    0.00    None       0          1             0  \n",
      "22     17.9375   71.75    None       0         -1             0  \n",
      "23      6.2425    0.00    None       0          1             0  \n",
      "24      5.0000    0.00    None       0          1             0  \n",
      "25      6.4400    0.00    None       0          1             0  \n"
     ]
    },
    {
     "name": "stdin",
     "output_type": "stream",
     "text": [
      " \n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "backtest: Settle!\n",
      "open      1.034000e+01\n",
      "high      1.047000e+01\n",
      "low       1.032000e+01\n",
      "close     1.034000e+01\n",
      "volume    6.593550e+05\n",
      "amount    6.844657e+08\n",
      "Name: (2019-01-21 00:00:00, 000001), dtype: float64\n",
      "---------------under is 当前全市场的market_data --------------\n",
      "                    open   high    low  close    volume       amount\n",
      "2019-01-21 000001  10.34  10.47  10.32  10.34  659355.0  684465664.0\n",
      "---------------under is 当前品种的market_data --------------\n",
      "                    open   high    low  close     volume        amount\n",
      "2019-01-02 000001   9.39   9.42   9.16   9.19   539386.0  4.986951e+08\n",
      "2019-01-03 000001   9.18   9.33   9.15   9.28   415537.0  3.844577e+08\n",
      "2019-01-04 000001   9.24   9.82   9.22   9.75  1481159.0  1.422150e+09\n",
      "2019-01-07 000001   9.84   9.85   9.63   9.74   865687.0  8.411664e+08\n",
      "2019-01-08 000001   9.73   9.74   9.62   9.66   402388.0  3.892478e+08\n",
      "2019-01-09 000001   9.74  10.08   9.70   9.94  1233486.0  1.229465e+09\n",
      "2019-01-10 000001   9.87  10.20   9.86  10.10  1071817.0  1.079711e+09\n",
      "2019-01-11 000001  10.11  10.22  10.05  10.20   696364.0  7.080018e+08\n",
      "2019-01-14 000001  10.22  10.25  10.07  10.11   500443.0  5.078629e+08\n",
      "2019-01-15 000001  10.11  10.28  10.09  10.24   542160.0  5.530273e+08\n",
      "2019-01-16 000001  10.24  10.50  10.23  10.48   977699.0  1.017495e+09\n",
      "2019-01-17 000001  10.54  10.57  10.17  10.25   882811.0  9.102121e+08\n",
      "2019-01-18 000001  10.34  10.49  10.28  10.43   738793.0  7.699736e+08\n",
      "2019-01-21 000001  10.34  10.47  10.32  10.34   659355.0  6.844657e+08\n",
      "000001\n",
      "---------------under is 账户情况和持仓情况 -------------------\n",
      "{'code': '000001', 'instrument_id': '000001', 'user_id': 'x', 'portfolio_cookie': 'default', 'username': 'quantaxis', 'position_id': 'd2b24d5c-fb1e-4a2e-97eb-f19b04f544ec', 'account_cookie': 'x', 'frozen': {}, 'name': None, 'spms_id': None, 'oms_id': None, 'market_type': 'stock_cn', 'exchange_id': None, 'moneypreset': 100000, 'moneypresetLeft': 100000, 'lastupdatetime': '', 'volume_long_today': 8000, 'volume_long_his': 0, 'volume_long': 8000, 'volume_short_today': 0, 'volume_short_his': 0, 'volume_short': 0, 'volume_long_frozen_today': 0, 'volume_long_frozen_his': 0, 'volume_long_frozen': 0, 'volume_short_frozen_today': 0, 'volume_short_frozen_his': 0, 'volume_short_frozen': 0, 'margin_long': 79120.0, 'margin_short': 0, 'margin': 79120.0, 'position_price_long': 9.89, 'position_cost_long': 79120.0, 'position_price_short': 0, 'position_cost_short': 0, 'open_price_long': 9.89, 'open_cost_long': 79120.0, 'open_price_short': 0, 'open_cost_short': 0, 'trades': [], 'orders': {}, 'last_price': 10.34, 'float_profit_long': 3600.0, 'float_profit_short': 0.0, 'float_profit': 3600.0, 'position_profit_long': 3600.0, 'position_profit_short': 0.0, 'position_profit': 3600.0}\n",
      "               datetime    code  price  amount          cash  \\\n",
      "0   2019-01-02 00:00:00  000001   9.19    1000  9.908050e+05   \n",
      "1   2019-01-02 00:00:00  000002  23.90    1000  9.668990e+05   \n",
      "2   2019-01-03 00:00:00  000001   9.28    1000  9.576140e+05   \n",
      "3   2019-01-03 00:00:00  000002  24.07   -1000  9.816539e+05   \n",
      "4   2019-01-04 00:00:00  000001   9.75   -2000  1.001129e+06   \n",
      "5   2019-01-04 00:00:00  000002  24.93    1000  9.761932e+05   \n",
      "6   2019-01-07 00:00:00  000001   9.74    1000  9.664482e+05   \n",
      "7   2019-01-07 00:00:00  000002  25.05   -2000  1.016486e+06   \n",
      "8   2019-01-08 00:00:00  000001   9.66   -3000  1.045429e+06   \n",
      "9   2019-01-08 00:00:00  000002  25.00   -2000  1.095367e+06   \n",
      "10  2019-01-09 00:00:00  000001   9.94    1000  1.085422e+06   \n",
      "11  2019-01-09 00:00:00  000002  25.33    1000  1.060086e+06   \n",
      "12  2019-01-10 00:00:00  000001  10.10    1000  1.049981e+06   \n",
      "13  2019-01-10 00:00:00  000002  25.11    1000  1.024864e+06   \n",
      "14  2019-01-11 00:00:00  000001  10.20    1000  1.014659e+06   \n",
      "15  2019-01-11 00:00:00  000002  25.30   -4000  1.115733e+06   \n",
      "16  2019-01-14 00:00:00  000001  10.11   -6000  1.176317e+06   \n",
      "17  2019-01-14 00:00:00  000002  25.02    1000  1.151291e+06   \n",
      "18  2019-01-15 00:00:00  000001  10.24    1000  1.141046e+06   \n",
      "19  2019-01-15 00:00:00  000002  25.16   -5000  1.266688e+06   \n",
      "20  2019-01-16 00:00:00  000001  10.48   -7000  1.339957e+06   \n",
      "21  2019-01-16 00:00:00  000002  25.42    1000  1.314530e+06   \n",
      "22  2019-01-17 00:00:00  000001  10.25   -7000  1.386191e+06   \n",
      "23  2019-01-17 00:00:00  000002  24.97    1000  1.361214e+06   \n",
      "24  2019-01-18 00:00:00  000001  10.43    1000  1.350779e+06   \n",
      "25  2019-01-18 00:00:00  000002  25.76    1000  1.325013e+06   \n",
      "26  2019-01-21 00:00:00  000001  10.34   -8000  1.407630e+06   \n",
      "\n",
      "                                order_id realorder_id trade_id account_cookie  \\\n",
      "0   e23f9e01-e8d2-4a05-93ef-9163ce7a83ee         None     None              x   \n",
      "1   1f430faa-86d1-440b-abf7-a7feddc17954         None     None              x   \n",
      "2   0230d608-91cc-422e-8deb-218f4faef3d7         None     None              x   \n",
      "3   427f1eed-b3bd-4078-94e3-156bf3ae21a6         None     None              x   \n",
      "4   48fd88b8-e3c0-4df5-94ef-62b936345bd9         None     None              x   \n",
      "5   d9aff179-9bc3-4268-b2d5-37eee8de309f         None     None              x   \n",
      "6   41f23955-b920-4f04-bcb7-ca1cd960aa45         None     None              x   \n",
      "7   cb2fdd74-7326-41d9-812f-9d88da447741         None     None              x   \n",
      "8   8ef82ee7-87b8-4f7d-8a01-374f52b60cbb         None     None              x   \n",
      "9   1f63fa52-f56b-4814-8eb3-5e4de849f3cb         None     None              x   \n",
      "10  13e77d45-9e2c-4ef3-89f5-7fa63cc3b808         None     None              x   \n",
      "11  7e714c35-83a4-4cb4-8ab5-d4fb2b31ccb7         None     None              x   \n",
      "12  380f932e-7871-4c72-94d3-5077861c9f53         None     None              x   \n",
      "13  3966e418-9017-4565-b24f-ed9455ef5593         None     None              x   \n",
      "14  99048106-f032-45a2-92c6-5a076f899a8a         None     None              x   \n",
      "15  3529f52a-3c09-46fc-944d-b3c619af7cd7         None     None              x   \n",
      "16  650c29d4-459c-412a-8000-c881af3c662a         None     None              x   \n",
      "17  9d0b7e50-53ac-42df-9175-c3f303387629         None     None              x   \n",
      "18  80ac049d-602e-44ff-a799-3be84acdfe55         None     None              x   \n",
      "19  e354ff47-4298-4d5a-a22e-794e327dee61         None     None              x   \n",
      "20  4977e6e3-e6ee-4d8c-8c43-9b1f027e07b1         None     None              x   \n",
      "21  16d8792c-b2f0-400d-b2a6-aa5c2e473728         None     None              x   \n",
      "22  eff96ddf-6dbb-4af3-a7bd-1f170e632dbc         None     None              x   \n",
      "23  7b21c653-d1d1-44d8-9772-790585915ae4         None     None              x   \n",
      "24  dfe8fbac-ff27-4746-a53a-f6220f3c63a6         None     None              x   \n",
      "25  98e05d3a-cdf5-4cac-bd41-fa747e29a2a4         None     None              x   \n",
      "26  23cd8f74-342a-4796-aeeb-07441bed75e1         None     None              x   \n",
      "\n",
      "    commission     tax message  frozen  direction  total_frozen  \n",
      "0       5.0000    0.00    None       0          1             0  \n",
      "1       5.9750    0.00    None       0          1             0  \n",
      "2       5.0000    0.00    None       0          1             0  \n",
      "3       6.0175   24.07    None       0         -1             0  \n",
      "4       5.0000   19.50    None       0         -1             0  \n",
      "5       6.2325    0.00    None       0          1             0  \n",
      "6       5.0000    0.00    None       0          1             0  \n",
      "7      12.5250   50.10    None       0         -1             0  \n",
      "8       7.2450   28.98    None       0         -1             0  \n",
      "9      12.5000   50.00    None       0         -1             0  \n",
      "10      5.0000    0.00    None       0          1             0  \n",
      "11      6.3325    0.00    None       0          1             0  \n",
      "12      5.0000    0.00    None       0          1             0  \n",
      "13      6.2775    0.00    None       0          1             0  \n",
      "14      5.0000    0.00    None       0          1             0  \n",
      "15     25.3000  101.20    None       0         -1             0  \n",
      "16     15.1650   60.66    None       0         -1             0  \n",
      "17      6.2550    0.00    None       0          1             0  \n",
      "18      5.0000    0.00    None       0          1             0  \n",
      "19     31.4500  125.80    None       0         -1             0  \n",
      "20     18.3400   73.36    None       0         -1             0  \n",
      "21      6.3550    0.00    None       0          1             0  \n",
      "22     17.9375   71.75    None       0         -1             0  \n",
      "23      6.2425    0.00    None       0          1             0  \n",
      "24      5.0000    0.00    None       0          1             0  \n",
      "25      6.4400    0.00    None       0          1             0  \n",
      "26     20.6800   82.72    None       0         -1             0  \n"
     ]
    },
    {
     "name": "stdin",
     "output_type": "stream",
     "text": [
      " \n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "open      2.571000e+01\n",
      "high      2.595000e+01\n",
      "low       2.540000e+01\n",
      "close     2.565000e+01\n",
      "volume    2.554990e+05\n",
      "amount    6.558207e+08\n",
      "Name: (2019-01-21 00:00:00, 000002), dtype: float64\n",
      "---------------under is 当前全市场的market_data --------------\n",
      "                    open   high    low  close    volume       amount\n",
      "2019-01-21 000001  10.34  10.47  10.32  10.34  659355.0  684465664.0\n",
      "           000002  25.71  25.95  25.40  25.65  255499.0  655820672.0\n",
      "---------------under is 当前品种的market_data --------------\n",
      "                    open   high    low  close    volume        amount\n",
      "2019-01-02 000002  23.83  24.09  23.67  23.90  247010.0  5.893846e+08\n",
      "2019-01-03 000002  23.79  24.50  23.71  24.07  222353.0  5.363333e+08\n",
      "2019-01-04 000002  23.91  25.00  23.85  24.93  377727.0  9.270117e+08\n",
      "2019-01-07 000002  25.29  25.53  24.99  25.05  427154.0  1.077909e+09\n",
      "2019-01-08 000002  25.05  25.20  24.63  25.00  214382.0  5.336044e+08\n",
      "2019-01-09 000002  25.40  25.88  25.11  25.33  340140.0  8.670814e+08\n",
      "2019-01-10 000002  25.22  25.56  25.03  25.11  224649.0  5.689526e+08\n",
      "2019-01-11 000002  25.10  25.54  25.01  25.30  240694.0  6.069947e+08\n",
      "2019-01-14 000002  25.13  25.30  24.92  25.02  183281.0  4.591518e+08\n",
      "2019-01-15 000002  25.00  25.16  24.32  25.16  368758.0  9.149835e+08\n",
      "2019-01-16 000002  25.15  25.50  24.83  25.42  267466.0  6.766856e+08\n",
      "2019-01-17 000002  25.50  25.50  24.94  24.97  245895.0  6.188767e+08\n",
      "2019-01-18 000002  25.00  25.76  24.99  25.76  365723.0  9.334642e+08\n",
      "2019-01-21 000002  25.71  25.95  25.40  25.65  255499.0  6.558207e+08\n",
      "000002\n",
      "---------------under is 账户情况和持仓情况 -------------------\n",
      "{'code': '000002', 'instrument_id': '000002', 'user_id': 'x', 'portfolio_cookie': 'default', 'username': 'quantaxis', 'position_id': '5aa694d0-3861-43a8-9efc-84f380138bea', 'account_cookie': 'x', 'frozen': {}, 'name': None, 'spms_id': None, 'oms_id': None, 'market_type': 'stock_cn', 'exchange_id': None, 'moneypreset': 100000, 'moneypresetLeft': 100000, 'lastupdatetime': '', 'volume_long_today': 8000, 'volume_long_his': 0, 'volume_long': 8000, 'volume_short_today': 0, 'volume_short_his': 0, 'volume_short': 0, 'volume_long_frozen_today': 0, 'volume_long_frozen_his': 0, 'volume_long_frozen': 0, 'volume_short_frozen_today': 0, 'volume_short_frozen_his': 0, 'volume_short_frozen': 0, 'margin_long': 200440.0, 'margin_short': 0, 'margin': 200440.0, 'position_price_long': 25.055, 'position_cost_long': 200440.0, 'position_price_short': 0, 'position_cost_short': 0, 'open_price_long': 25.055, 'open_cost_long': 200440.0, 'open_price_short': 0, 'open_cost_short': 0, 'trades': [], 'orders': {}, 'last_price': 25.65, 'float_profit_long': 4760.0, 'float_profit_short': 0.0, 'float_profit': 4760.0, 'position_profit_long': 4760.0, 'position_profit_short': 0.0, 'position_profit': 4760.0}\n",
      "               datetime    code  price  amount          cash  \\\n",
      "0   2019-01-02 00:00:00  000001   9.19    1000  9.908050e+05   \n",
      "1   2019-01-02 00:00:00  000002  23.90    1000  9.668990e+05   \n",
      "2   2019-01-03 00:00:00  000001   9.28    1000  9.576140e+05   \n",
      "3   2019-01-03 00:00:00  000002  24.07   -1000  9.816539e+05   \n",
      "4   2019-01-04 00:00:00  000001   9.75   -2000  1.001129e+06   \n",
      "5   2019-01-04 00:00:00  000002  24.93    1000  9.761932e+05   \n",
      "6   2019-01-07 00:00:00  000001   9.74    1000  9.664482e+05   \n",
      "7   2019-01-07 00:00:00  000002  25.05   -2000  1.016486e+06   \n",
      "8   2019-01-08 00:00:00  000001   9.66   -3000  1.045429e+06   \n",
      "9   2019-01-08 00:00:00  000002  25.00   -2000  1.095367e+06   \n",
      "10  2019-01-09 00:00:00  000001   9.94    1000  1.085422e+06   \n",
      "11  2019-01-09 00:00:00  000002  25.33    1000  1.060086e+06   \n",
      "12  2019-01-10 00:00:00  000001  10.10    1000  1.049981e+06   \n",
      "13  2019-01-10 00:00:00  000002  25.11    1000  1.024864e+06   \n",
      "14  2019-01-11 00:00:00  000001  10.20    1000  1.014659e+06   \n",
      "15  2019-01-11 00:00:00  000002  25.30   -4000  1.115733e+06   \n",
      "16  2019-01-14 00:00:00  000001  10.11   -6000  1.176317e+06   \n",
      "17  2019-01-14 00:00:00  000002  25.02    1000  1.151291e+06   \n",
      "18  2019-01-15 00:00:00  000001  10.24    1000  1.141046e+06   \n",
      "19  2019-01-15 00:00:00  000002  25.16   -5000  1.266688e+06   \n",
      "20  2019-01-16 00:00:00  000001  10.48   -7000  1.339957e+06   \n",
      "21  2019-01-16 00:00:00  000002  25.42    1000  1.314530e+06   \n",
      "22  2019-01-17 00:00:00  000001  10.25   -7000  1.386191e+06   \n",
      "23  2019-01-17 00:00:00  000002  24.97    1000  1.361214e+06   \n",
      "24  2019-01-18 00:00:00  000001  10.43    1000  1.350779e+06   \n",
      "25  2019-01-18 00:00:00  000002  25.76    1000  1.325013e+06   \n",
      "26  2019-01-21 00:00:00  000001  10.34   -8000  1.407630e+06   \n",
      "27  2019-01-21 00:00:00  000002  25.65   -8000  1.612573e+06   \n",
      "\n",
      "                                order_id realorder_id trade_id account_cookie  \\\n",
      "0   e23f9e01-e8d2-4a05-93ef-9163ce7a83ee         None     None              x   \n",
      "1   1f430faa-86d1-440b-abf7-a7feddc17954         None     None              x   \n",
      "2   0230d608-91cc-422e-8deb-218f4faef3d7         None     None              x   \n",
      "3   427f1eed-b3bd-4078-94e3-156bf3ae21a6         None     None              x   \n",
      "4   48fd88b8-e3c0-4df5-94ef-62b936345bd9         None     None              x   \n",
      "5   d9aff179-9bc3-4268-b2d5-37eee8de309f         None     None              x   \n",
      "6   41f23955-b920-4f04-bcb7-ca1cd960aa45         None     None              x   \n",
      "7   cb2fdd74-7326-41d9-812f-9d88da447741         None     None              x   \n",
      "8   8ef82ee7-87b8-4f7d-8a01-374f52b60cbb         None     None              x   \n",
      "9   1f63fa52-f56b-4814-8eb3-5e4de849f3cb         None     None              x   \n",
      "10  13e77d45-9e2c-4ef3-89f5-7fa63cc3b808         None     None              x   \n",
      "11  7e714c35-83a4-4cb4-8ab5-d4fb2b31ccb7         None     None              x   \n",
      "12  380f932e-7871-4c72-94d3-5077861c9f53         None     None              x   \n",
      "13  3966e418-9017-4565-b24f-ed9455ef5593         None     None              x   \n",
      "14  99048106-f032-45a2-92c6-5a076f899a8a         None     None              x   \n",
      "15  3529f52a-3c09-46fc-944d-b3c619af7cd7         None     None              x   \n",
      "16  650c29d4-459c-412a-8000-c881af3c662a         None     None              x   \n",
      "17  9d0b7e50-53ac-42df-9175-c3f303387629         None     None              x   \n",
      "18  80ac049d-602e-44ff-a799-3be84acdfe55         None     None              x   \n",
      "19  e354ff47-4298-4d5a-a22e-794e327dee61         None     None              x   \n",
      "20  4977e6e3-e6ee-4d8c-8c43-9b1f027e07b1         None     None              x   \n",
      "21  16d8792c-b2f0-400d-b2a6-aa5c2e473728         None     None              x   \n",
      "22  eff96ddf-6dbb-4af3-a7bd-1f170e632dbc         None     None              x   \n",
      "23  7b21c653-d1d1-44d8-9772-790585915ae4         None     None              x   \n",
      "24  dfe8fbac-ff27-4746-a53a-f6220f3c63a6         None     None              x   \n",
      "25  98e05d3a-cdf5-4cac-bd41-fa747e29a2a4         None     None              x   \n",
      "26  23cd8f74-342a-4796-aeeb-07441bed75e1         None     None              x   \n",
      "27  3f7dad60-3de4-4ca9-ba5e-af87d33594e6         None     None              x   \n",
      "\n",
      "    commission     tax message  frozen  direction  total_frozen  \n",
      "0       5.0000    0.00    None       0          1             0  \n",
      "1       5.9750    0.00    None       0          1             0  \n",
      "2       5.0000    0.00    None       0          1             0  \n",
      "3       6.0175   24.07    None       0         -1             0  \n",
      "4       5.0000   19.50    None       0         -1             0  \n",
      "5       6.2325    0.00    None       0          1             0  \n",
      "6       5.0000    0.00    None       0          1             0  \n",
      "7      12.5250   50.10    None       0         -1             0  \n",
      "8       7.2450   28.98    None       0         -1             0  \n",
      "9      12.5000   50.00    None       0         -1             0  \n",
      "10      5.0000    0.00    None       0          1             0  \n",
      "11      6.3325    0.00    None       0          1             0  \n",
      "12      5.0000    0.00    None       0          1             0  \n",
      "13      6.2775    0.00    None       0          1             0  \n",
      "14      5.0000    0.00    None       0          1             0  \n",
      "15     25.3000  101.20    None       0         -1             0  \n",
      "16     15.1650   60.66    None       0         -1             0  \n",
      "17      6.2550    0.00    None       0          1             0  \n",
      "18      5.0000    0.00    None       0          1             0  \n",
      "19     31.4500  125.80    None       0         -1             0  \n",
      "20     18.3400   73.36    None       0         -1             0  \n",
      "21      6.3550    0.00    None       0          1             0  \n",
      "22     17.9375   71.75    None       0         -1             0  \n",
      "23      6.2425    0.00    None       0          1             0  \n",
      "24      5.0000    0.00    None       0          1             0  \n",
      "25      6.4400    0.00    None       0          1             0  \n",
      "26     20.6800   82.72    None       0         -1             0  \n",
      "27     51.3000  205.20    None       0         -1             0  \n"
     ]
    },
    {
     "name": "stdin",
     "output_type": "stream",
     "text": [
      " \n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "backtest: Settle!\n",
      "open      1.034000e+01\n",
      "high      1.044000e+01\n",
      "low       1.026000e+01\n",
      "close     1.028000e+01\n",
      "volume    4.244130e+05\n",
      "amount    4.389915e+08\n",
      "Name: (2019-01-22 00:00:00, 000001), dtype: float64\n",
      "---------------under is 当前全市场的market_data --------------\n",
      "                    open   high    low  close    volume       amount\n",
      "2019-01-22 000001  10.34  10.44  10.26  10.28  424413.0  438991456.0\n",
      "---------------under is 当前品种的market_data --------------\n",
      "                    open   high    low  close     volume        amount\n",
      "2019-01-02 000001   9.39   9.42   9.16   9.19   539386.0  4.986951e+08\n",
      "2019-01-03 000001   9.18   9.33   9.15   9.28   415537.0  3.844577e+08\n",
      "2019-01-04 000001   9.24   9.82   9.22   9.75  1481159.0  1.422150e+09\n",
      "2019-01-07 000001   9.84   9.85   9.63   9.74   865687.0  8.411664e+08\n",
      "2019-01-08 000001   9.73   9.74   9.62   9.66   402388.0  3.892478e+08\n",
      "2019-01-09 000001   9.74  10.08   9.70   9.94  1233486.0  1.229465e+09\n",
      "2019-01-10 000001   9.87  10.20   9.86  10.10  1071817.0  1.079711e+09\n",
      "2019-01-11 000001  10.11  10.22  10.05  10.20   696364.0  7.080018e+08\n",
      "2019-01-14 000001  10.22  10.25  10.07  10.11   500443.0  5.078629e+08\n",
      "2019-01-15 000001  10.11  10.28  10.09  10.24   542160.0  5.530273e+08\n",
      "2019-01-16 000001  10.24  10.50  10.23  10.48   977699.0  1.017495e+09\n",
      "2019-01-17 000001  10.54  10.57  10.17  10.25   882811.0  9.102121e+08\n",
      "2019-01-18 000001  10.34  10.49  10.28  10.43   738793.0  7.699736e+08\n",
      "2019-01-21 000001  10.34  10.47  10.32  10.34   659355.0  6.844657e+08\n",
      "2019-01-22 000001  10.34  10.44  10.26  10.28   424413.0  4.389915e+08\n",
      "000001\n",
      "---------------under is 账户情况和持仓情况 -------------------\n",
      "{'code': '000001', 'instrument_id': '000001', 'user_id': 'x', 'portfolio_cookie': 'default', 'username': 'quantaxis', 'position_id': 'd2b24d5c-fb1e-4a2e-97eb-f19b04f544ec', 'account_cookie': 'x', 'frozen': {}, 'name': None, 'spms_id': None, 'oms_id': None, 'market_type': 'stock_cn', 'exchange_id': None, 'moneypreset': 100000, 'moneypresetLeft': 100000, 'lastupdatetime': '', 'volume_long_today': 8000, 'volume_long_his': 0, 'volume_long': 8000, 'volume_short_today': 0, 'volume_short_his': 0, 'volume_short': 0, 'volume_long_frozen_today': 0, 'volume_long_frozen_his': 0, 'volume_long_frozen': 0, 'volume_short_frozen_today': 0, 'volume_short_frozen_his': 0, 'volume_short_frozen': 0, 'margin_long': 79120.0, 'margin_short': 0, 'margin': 79120.0, 'position_price_long': 9.89, 'position_cost_long': 79120.0, 'position_price_short': 0, 'position_cost_short': 0, 'open_price_long': 9.89, 'open_cost_long': 79120.0, 'open_price_short': 0, 'open_cost_short': 0, 'trades': [], 'orders': {}, 'last_price': 10.28, 'float_profit_long': 3120.0, 'float_profit_short': 0.0, 'float_profit': 3120.0, 'position_profit_long': 3120.0, 'position_profit_short': 0.0, 'position_profit': 3120.0}\n",
      "               datetime    code  price  amount          cash  \\\n",
      "0   2019-01-02 00:00:00  000001   9.19    1000  9.908050e+05   \n",
      "1   2019-01-02 00:00:00  000002  23.90    1000  9.668990e+05   \n",
      "2   2019-01-03 00:00:00  000001   9.28    1000  9.576140e+05   \n",
      "3   2019-01-03 00:00:00  000002  24.07   -1000  9.816539e+05   \n",
      "4   2019-01-04 00:00:00  000001   9.75   -2000  1.001129e+06   \n",
      "5   2019-01-04 00:00:00  000002  24.93    1000  9.761932e+05   \n",
      "6   2019-01-07 00:00:00  000001   9.74    1000  9.664482e+05   \n",
      "7   2019-01-07 00:00:00  000002  25.05   -2000  1.016486e+06   \n",
      "8   2019-01-08 00:00:00  000001   9.66   -3000  1.045429e+06   \n",
      "9   2019-01-08 00:00:00  000002  25.00   -2000  1.095367e+06   \n",
      "10  2019-01-09 00:00:00  000001   9.94    1000  1.085422e+06   \n",
      "11  2019-01-09 00:00:00  000002  25.33    1000  1.060086e+06   \n",
      "12  2019-01-10 00:00:00  000001  10.10    1000  1.049981e+06   \n",
      "13  2019-01-10 00:00:00  000002  25.11    1000  1.024864e+06   \n",
      "14  2019-01-11 00:00:00  000001  10.20    1000  1.014659e+06   \n",
      "15  2019-01-11 00:00:00  000002  25.30   -4000  1.115733e+06   \n",
      "16  2019-01-14 00:00:00  000001  10.11   -6000  1.176317e+06   \n",
      "17  2019-01-14 00:00:00  000002  25.02    1000  1.151291e+06   \n",
      "18  2019-01-15 00:00:00  000001  10.24    1000  1.141046e+06   \n",
      "19  2019-01-15 00:00:00  000002  25.16   -5000  1.266688e+06   \n",
      "20  2019-01-16 00:00:00  000001  10.48   -7000  1.339957e+06   \n",
      "21  2019-01-16 00:00:00  000002  25.42    1000  1.314530e+06   \n",
      "22  2019-01-17 00:00:00  000001  10.25   -7000  1.386191e+06   \n",
      "23  2019-01-17 00:00:00  000002  24.97    1000  1.361214e+06   \n",
      "24  2019-01-18 00:00:00  000001  10.43    1000  1.350779e+06   \n",
      "25  2019-01-18 00:00:00  000002  25.76    1000  1.325013e+06   \n",
      "26  2019-01-21 00:00:00  000001  10.34   -8000  1.407630e+06   \n",
      "27  2019-01-21 00:00:00  000002  25.65   -8000  1.612573e+06   \n",
      "28  2019-01-22 00:00:00  000001  10.28   -8000  1.694710e+06   \n",
      "\n",
      "                                order_id realorder_id trade_id account_cookie  \\\n",
      "0   e23f9e01-e8d2-4a05-93ef-9163ce7a83ee         None     None              x   \n",
      "1   1f430faa-86d1-440b-abf7-a7feddc17954         None     None              x   \n",
      "2   0230d608-91cc-422e-8deb-218f4faef3d7         None     None              x   \n",
      "3   427f1eed-b3bd-4078-94e3-156bf3ae21a6         None     None              x   \n",
      "4   48fd88b8-e3c0-4df5-94ef-62b936345bd9         None     None              x   \n",
      "5   d9aff179-9bc3-4268-b2d5-37eee8de309f         None     None              x   \n",
      "6   41f23955-b920-4f04-bcb7-ca1cd960aa45         None     None              x   \n",
      "7   cb2fdd74-7326-41d9-812f-9d88da447741         None     None              x   \n",
      "8   8ef82ee7-87b8-4f7d-8a01-374f52b60cbb         None     None              x   \n",
      "9   1f63fa52-f56b-4814-8eb3-5e4de849f3cb         None     None              x   \n",
      "10  13e77d45-9e2c-4ef3-89f5-7fa63cc3b808         None     None              x   \n",
      "11  7e714c35-83a4-4cb4-8ab5-d4fb2b31ccb7         None     None              x   \n",
      "12  380f932e-7871-4c72-94d3-5077861c9f53         None     None              x   \n",
      "13  3966e418-9017-4565-b24f-ed9455ef5593         None     None              x   \n",
      "14  99048106-f032-45a2-92c6-5a076f899a8a         None     None              x   \n",
      "15  3529f52a-3c09-46fc-944d-b3c619af7cd7         None     None              x   \n",
      "16  650c29d4-459c-412a-8000-c881af3c662a         None     None              x   \n",
      "17  9d0b7e50-53ac-42df-9175-c3f303387629         None     None              x   \n",
      "18  80ac049d-602e-44ff-a799-3be84acdfe55         None     None              x   \n",
      "19  e354ff47-4298-4d5a-a22e-794e327dee61         None     None              x   \n",
      "20  4977e6e3-e6ee-4d8c-8c43-9b1f027e07b1         None     None              x   \n",
      "21  16d8792c-b2f0-400d-b2a6-aa5c2e473728         None     None              x   \n",
      "22  eff96ddf-6dbb-4af3-a7bd-1f170e632dbc         None     None              x   \n",
      "23  7b21c653-d1d1-44d8-9772-790585915ae4         None     None              x   \n",
      "24  dfe8fbac-ff27-4746-a53a-f6220f3c63a6         None     None              x   \n",
      "25  98e05d3a-cdf5-4cac-bd41-fa747e29a2a4         None     None              x   \n",
      "26  23cd8f74-342a-4796-aeeb-07441bed75e1         None     None              x   \n",
      "27  3f7dad60-3de4-4ca9-ba5e-af87d33594e6         None     None              x   \n",
      "28  f2b9cae9-b1d9-4a00-ba62-ce81baec3d72         None     None              x   \n",
      "\n",
      "    commission     tax message  frozen  direction  total_frozen  \n",
      "0       5.0000    0.00    None       0          1             0  \n",
      "1       5.9750    0.00    None       0          1             0  \n",
      "2       5.0000    0.00    None       0          1             0  \n",
      "3       6.0175   24.07    None       0         -1             0  \n",
      "4       5.0000   19.50    None       0         -1             0  \n",
      "5       6.2325    0.00    None       0          1             0  \n",
      "6       5.0000    0.00    None       0          1             0  \n",
      "7      12.5250   50.10    None       0         -1             0  \n",
      "8       7.2450   28.98    None       0         -1             0  \n",
      "9      12.5000   50.00    None       0         -1             0  \n",
      "10      5.0000    0.00    None       0          1             0  \n",
      "11      6.3325    0.00    None       0          1             0  \n",
      "12      5.0000    0.00    None       0          1             0  \n",
      "13      6.2775    0.00    None       0          1             0  \n",
      "14      5.0000    0.00    None       0          1             0  \n",
      "15     25.3000  101.20    None       0         -1             0  \n",
      "16     15.1650   60.66    None       0         -1             0  \n",
      "17      6.2550    0.00    None       0          1             0  \n",
      "18      5.0000    0.00    None       0          1             0  \n",
      "19     31.4500  125.80    None       0         -1             0  \n",
      "20     18.3400   73.36    None       0         -1             0  \n",
      "21      6.3550    0.00    None       0          1             0  \n",
      "22     17.9375   71.75    None       0         -1             0  \n",
      "23      6.2425    0.00    None       0          1             0  \n",
      "24      5.0000    0.00    None       0          1             0  \n",
      "25      6.4400    0.00    None       0          1             0  \n",
      "26     20.6800   82.72    None       0         -1             0  \n",
      "27     51.3000  205.20    None       0         -1             0  \n",
      "28     20.5600   82.24    None       0         -1             0  \n"
     ]
    },
    {
     "name": "stdin",
     "output_type": "stream",
     "text": [
      " \n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "open      2.550000e+01\n",
      "high      2.617000e+01\n",
      "low       2.523000e+01\n",
      "close     2.540000e+01\n",
      "volume    3.793360e+05\n",
      "amount    9.748227e+08\n",
      "Name: (2019-01-22 00:00:00, 000002), dtype: float64\n",
      "---------------under is 当前全市场的market_data --------------\n",
      "                    open   high    low  close    volume       amount\n",
      "2019-01-22 000001  10.34  10.44  10.26  10.28  424413.0  438991456.0\n",
      "           000002  25.50  26.17  25.23  25.40  379336.0  974822720.0\n",
      "---------------under is 当前品种的market_data --------------\n",
      "                    open   high    low  close    volume        amount\n",
      "2019-01-02 000002  23.83  24.09  23.67  23.90  247010.0  5.893846e+08\n",
      "2019-01-03 000002  23.79  24.50  23.71  24.07  222353.0  5.363333e+08\n",
      "2019-01-04 000002  23.91  25.00  23.85  24.93  377727.0  9.270117e+08\n",
      "2019-01-07 000002  25.29  25.53  24.99  25.05  427154.0  1.077909e+09\n",
      "2019-01-08 000002  25.05  25.20  24.63  25.00  214382.0  5.336044e+08\n",
      "2019-01-09 000002  25.40  25.88  25.11  25.33  340140.0  8.670814e+08\n",
      "2019-01-10 000002  25.22  25.56  25.03  25.11  224649.0  5.689526e+08\n",
      "2019-01-11 000002  25.10  25.54  25.01  25.30  240694.0  6.069947e+08\n",
      "2019-01-14 000002  25.13  25.30  24.92  25.02  183281.0  4.591518e+08\n",
      "2019-01-15 000002  25.00  25.16  24.32  25.16  368758.0  9.149835e+08\n",
      "2019-01-16 000002  25.15  25.50  24.83  25.42  267466.0  6.766856e+08\n",
      "2019-01-17 000002  25.50  25.50  24.94  24.97  245895.0  6.188767e+08\n",
      "2019-01-18 000002  25.00  25.76  24.99  25.76  365723.0  9.334642e+08\n",
      "2019-01-21 000002  25.71  25.95  25.40  25.65  255499.0  6.558207e+08\n",
      "2019-01-22 000002  25.50  26.17  25.23  25.40  379336.0  9.748227e+08\n",
      "000002\n",
      "---------------under is 账户情况和持仓情况 -------------------\n",
      "{'code': '000002', 'instrument_id': '000002', 'user_id': 'x', 'portfolio_cookie': 'default', 'username': 'quantaxis', 'position_id': '5aa694d0-3861-43a8-9efc-84f380138bea', 'account_cookie': 'x', 'frozen': {}, 'name': None, 'spms_id': None, 'oms_id': None, 'market_type': 'stock_cn', 'exchange_id': None, 'moneypreset': 100000, 'moneypresetLeft': 100000, 'lastupdatetime': '', 'volume_long_today': 8000, 'volume_long_his': 0, 'volume_long': 8000, 'volume_short_today': 0, 'volume_short_his': 0, 'volume_short': 0, 'volume_long_frozen_today': 0, 'volume_long_frozen_his': 0, 'volume_long_frozen': 0, 'volume_short_frozen_today': 0, 'volume_short_frozen_his': 0, 'volume_short_frozen': 0, 'margin_long': 200440.0, 'margin_short': 0, 'margin': 200440.0, 'position_price_long': 25.055, 'position_cost_long': 200440.0, 'position_price_short': 0, 'position_cost_short': 0, 'open_price_long': 25.055, 'open_cost_long': 200440.0, 'open_price_short': 0, 'open_cost_short': 0, 'trades': [], 'orders': {}, 'last_price': 25.4, 'float_profit_long': 2760.0, 'float_profit_short': 0.0, 'float_profit': 2760.0, 'position_profit_long': 2760.0, 'position_profit_short': 0.0, 'position_profit': 2760.0}\n",
      "               datetime    code  price  amount          cash  \\\n",
      "0   2019-01-02 00:00:00  000001   9.19    1000  9.908050e+05   \n",
      "1   2019-01-02 00:00:00  000002  23.90    1000  9.668990e+05   \n",
      "2   2019-01-03 00:00:00  000001   9.28    1000  9.576140e+05   \n",
      "3   2019-01-03 00:00:00  000002  24.07   -1000  9.816539e+05   \n",
      "4   2019-01-04 00:00:00  000001   9.75   -2000  1.001129e+06   \n",
      "5   2019-01-04 00:00:00  000002  24.93    1000  9.761932e+05   \n",
      "6   2019-01-07 00:00:00  000001   9.74    1000  9.664482e+05   \n",
      "7   2019-01-07 00:00:00  000002  25.05   -2000  1.016486e+06   \n",
      "8   2019-01-08 00:00:00  000001   9.66   -3000  1.045429e+06   \n",
      "9   2019-01-08 00:00:00  000002  25.00   -2000  1.095367e+06   \n",
      "10  2019-01-09 00:00:00  000001   9.94    1000  1.085422e+06   \n",
      "11  2019-01-09 00:00:00  000002  25.33    1000  1.060086e+06   \n",
      "12  2019-01-10 00:00:00  000001  10.10    1000  1.049981e+06   \n",
      "13  2019-01-10 00:00:00  000002  25.11    1000  1.024864e+06   \n",
      "14  2019-01-11 00:00:00  000001  10.20    1000  1.014659e+06   \n",
      "15  2019-01-11 00:00:00  000002  25.30   -4000  1.115733e+06   \n",
      "16  2019-01-14 00:00:00  000001  10.11   -6000  1.176317e+06   \n",
      "17  2019-01-14 00:00:00  000002  25.02    1000  1.151291e+06   \n",
      "18  2019-01-15 00:00:00  000001  10.24    1000  1.141046e+06   \n",
      "19  2019-01-15 00:00:00  000002  25.16   -5000  1.266688e+06   \n",
      "20  2019-01-16 00:00:00  000001  10.48   -7000  1.339957e+06   \n",
      "21  2019-01-16 00:00:00  000002  25.42    1000  1.314530e+06   \n",
      "22  2019-01-17 00:00:00  000001  10.25   -7000  1.386191e+06   \n",
      "23  2019-01-17 00:00:00  000002  24.97    1000  1.361214e+06   \n",
      "24  2019-01-18 00:00:00  000001  10.43    1000  1.350779e+06   \n",
      "25  2019-01-18 00:00:00  000002  25.76    1000  1.325013e+06   \n",
      "26  2019-01-21 00:00:00  000001  10.34   -8000  1.407630e+06   \n",
      "27  2019-01-21 00:00:00  000002  25.65   -8000  1.612573e+06   \n",
      "28  2019-01-22 00:00:00  000001  10.28   -8000  1.694710e+06   \n",
      "29  2019-01-22 00:00:00  000002  25.40   -8000  1.897656e+06   \n",
      "\n",
      "                                order_id realorder_id trade_id account_cookie  \\\n",
      "0   e23f9e01-e8d2-4a05-93ef-9163ce7a83ee         None     None              x   \n",
      "1   1f430faa-86d1-440b-abf7-a7feddc17954         None     None              x   \n",
      "2   0230d608-91cc-422e-8deb-218f4faef3d7         None     None              x   \n",
      "3   427f1eed-b3bd-4078-94e3-156bf3ae21a6         None     None              x   \n",
      "4   48fd88b8-e3c0-4df5-94ef-62b936345bd9         None     None              x   \n",
      "5   d9aff179-9bc3-4268-b2d5-37eee8de309f         None     None              x   \n",
      "6   41f23955-b920-4f04-bcb7-ca1cd960aa45         None     None              x   \n",
      "7   cb2fdd74-7326-41d9-812f-9d88da447741         None     None              x   \n",
      "8   8ef82ee7-87b8-4f7d-8a01-374f52b60cbb         None     None              x   \n",
      "9   1f63fa52-f56b-4814-8eb3-5e4de849f3cb         None     None              x   \n",
      "10  13e77d45-9e2c-4ef3-89f5-7fa63cc3b808         None     None              x   \n",
      "11  7e714c35-83a4-4cb4-8ab5-d4fb2b31ccb7         None     None              x   \n",
      "12  380f932e-7871-4c72-94d3-5077861c9f53         None     None              x   \n",
      "13  3966e418-9017-4565-b24f-ed9455ef5593         None     None              x   \n",
      "14  99048106-f032-45a2-92c6-5a076f899a8a         None     None              x   \n",
      "15  3529f52a-3c09-46fc-944d-b3c619af7cd7         None     None              x   \n",
      "16  650c29d4-459c-412a-8000-c881af3c662a         None     None              x   \n",
      "17  9d0b7e50-53ac-42df-9175-c3f303387629         None     None              x   \n",
      "18  80ac049d-602e-44ff-a799-3be84acdfe55         None     None              x   \n",
      "19  e354ff47-4298-4d5a-a22e-794e327dee61         None     None              x   \n",
      "20  4977e6e3-e6ee-4d8c-8c43-9b1f027e07b1         None     None              x   \n",
      "21  16d8792c-b2f0-400d-b2a6-aa5c2e473728         None     None              x   \n",
      "22  eff96ddf-6dbb-4af3-a7bd-1f170e632dbc         None     None              x   \n",
      "23  7b21c653-d1d1-44d8-9772-790585915ae4         None     None              x   \n",
      "24  dfe8fbac-ff27-4746-a53a-f6220f3c63a6         None     None              x   \n",
      "25  98e05d3a-cdf5-4cac-bd41-fa747e29a2a4         None     None              x   \n",
      "26  23cd8f74-342a-4796-aeeb-07441bed75e1         None     None              x   \n",
      "27  3f7dad60-3de4-4ca9-ba5e-af87d33594e6         None     None              x   \n",
      "28  f2b9cae9-b1d9-4a00-ba62-ce81baec3d72         None     None              x   \n",
      "29  de5fce65-5a39-42c6-8d6e-914060c5f971         None     None              x   \n",
      "\n",
      "    commission     tax message  frozen  direction  total_frozen  \n",
      "0       5.0000    0.00    None       0          1             0  \n",
      "1       5.9750    0.00    None       0          1             0  \n",
      "2       5.0000    0.00    None       0          1             0  \n",
      "3       6.0175   24.07    None       0         -1             0  \n",
      "4       5.0000   19.50    None       0         -1             0  \n",
      "5       6.2325    0.00    None       0          1             0  \n",
      "6       5.0000    0.00    None       0          1             0  \n",
      "7      12.5250   50.10    None       0         -1             0  \n",
      "8       7.2450   28.98    None       0         -1             0  \n",
      "9      12.5000   50.00    None       0         -1             0  \n",
      "10      5.0000    0.00    None       0          1             0  \n",
      "11      6.3325    0.00    None       0          1             0  \n",
      "12      5.0000    0.00    None       0          1             0  \n",
      "13      6.2775    0.00    None       0          1             0  \n",
      "14      5.0000    0.00    None       0          1             0  \n",
      "15     25.3000  101.20    None       0         -1             0  \n",
      "16     15.1650   60.66    None       0         -1             0  \n",
      "17      6.2550    0.00    None       0          1             0  \n",
      "18      5.0000    0.00    None       0          1             0  \n",
      "19     31.4500  125.80    None       0         -1             0  \n",
      "20     18.3400   73.36    None       0         -1             0  \n",
      "21      6.3550    0.00    None       0          1             0  \n",
      "22     17.9375   71.75    None       0         -1             0  \n",
      "23      6.2425    0.00    None       0          1             0  \n",
      "24      5.0000    0.00    None       0          1             0  \n",
      "25      6.4400    0.00    None       0          1             0  \n",
      "26     20.6800   82.72    None       0         -1             0  \n",
      "27     51.3000  205.20    None       0         -1             0  \n",
      "28     20.5600   82.24    None       0         -1             0  \n",
      "29     50.8000  203.20    None       0         -1             0  \n"
     ]
    },
    {
     "name": "stdin",
     "output_type": "stream",
     "text": [
      " \n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "backtest: Settle!\n",
      "open      1.029000e+01\n",
      "high      1.047000e+01\n",
      "low       1.029000e+01\n",
      "close     1.035000e+01\n",
      "volume    5.378760e+05\n",
      "amount    5.593844e+08\n",
      "Name: (2019-01-23 00:00:00, 000001), dtype: float64\n",
      "---------------under is 当前全市场的market_data --------------\n",
      "                    open   high    low  close    volume       amount\n",
      "2019-01-23 000001  10.29  10.47  10.29  10.35  537876.0  559384384.0\n",
      "---------------under is 当前品种的market_data --------------\n",
      "                    open   high    low  close     volume        amount\n",
      "2019-01-02 000001   9.39   9.42   9.16   9.19   539386.0  4.986951e+08\n",
      "2019-01-03 000001   9.18   9.33   9.15   9.28   415537.0  3.844577e+08\n",
      "2019-01-04 000001   9.24   9.82   9.22   9.75  1481159.0  1.422150e+09\n",
      "2019-01-07 000001   9.84   9.85   9.63   9.74   865687.0  8.411664e+08\n",
      "2019-01-08 000001   9.73   9.74   9.62   9.66   402388.0  3.892478e+08\n",
      "2019-01-09 000001   9.74  10.08   9.70   9.94  1233486.0  1.229465e+09\n",
      "2019-01-10 000001   9.87  10.20   9.86  10.10  1071817.0  1.079711e+09\n",
      "2019-01-11 000001  10.11  10.22  10.05  10.20   696364.0  7.080018e+08\n",
      "2019-01-14 000001  10.22  10.25  10.07  10.11   500443.0  5.078629e+08\n",
      "2019-01-15 000001  10.11  10.28  10.09  10.24   542160.0  5.530273e+08\n",
      "2019-01-16 000001  10.24  10.50  10.23  10.48   977699.0  1.017495e+09\n",
      "2019-01-17 000001  10.54  10.57  10.17  10.25   882811.0  9.102121e+08\n",
      "2019-01-18 000001  10.34  10.49  10.28  10.43   738793.0  7.699736e+08\n",
      "2019-01-21 000001  10.34  10.47  10.32  10.34   659355.0  6.844657e+08\n",
      "2019-01-22 000001  10.34  10.44  10.26  10.28   424413.0  4.389915e+08\n",
      "2019-01-23 000001  10.29  10.47  10.29  10.35   537876.0  5.593844e+08\n",
      "000001\n",
      "---------------under is 账户情况和持仓情况 -------------------\n",
      "{'code': '000001', 'instrument_id': '000001', 'user_id': 'x', 'portfolio_cookie': 'default', 'username': 'quantaxis', 'position_id': 'd2b24d5c-fb1e-4a2e-97eb-f19b04f544ec', 'account_cookie': 'x', 'frozen': {}, 'name': None, 'spms_id': None, 'oms_id': None, 'market_type': 'stock_cn', 'exchange_id': None, 'moneypreset': 100000, 'moneypresetLeft': 100000, 'lastupdatetime': '', 'volume_long_today': 8000, 'volume_long_his': 0, 'volume_long': 8000, 'volume_short_today': 0, 'volume_short_his': 0, 'volume_short': 0, 'volume_long_frozen_today': 0, 'volume_long_frozen_his': 0, 'volume_long_frozen': 0, 'volume_short_frozen_today': 0, 'volume_short_frozen_his': 0, 'volume_short_frozen': 0, 'margin_long': 79120.0, 'margin_short': 0, 'margin': 79120.0, 'position_price_long': 9.89, 'position_cost_long': 79120.0, 'position_price_short': 0, 'position_cost_short': 0, 'open_price_long': 9.89, 'open_cost_long': 79120.0, 'open_price_short': 0, 'open_cost_short': 0, 'trades': [], 'orders': {}, 'last_price': 10.35, 'float_profit_long': 3680.0, 'float_profit_short': 0.0, 'float_profit': 3680.0, 'position_profit_long': 3680.0, 'position_profit_short': 0.0, 'position_profit': 3680.0}\n",
      "               datetime    code  price  amount          cash  \\\n",
      "0   2019-01-02 00:00:00  000001   9.19    1000  9.908050e+05   \n",
      "1   2019-01-02 00:00:00  000002  23.90    1000  9.668990e+05   \n",
      "2   2019-01-03 00:00:00  000001   9.28    1000  9.576140e+05   \n",
      "3   2019-01-03 00:00:00  000002  24.07   -1000  9.816539e+05   \n",
      "4   2019-01-04 00:00:00  000001   9.75   -2000  1.001129e+06   \n",
      "5   2019-01-04 00:00:00  000002  24.93    1000  9.761932e+05   \n",
      "6   2019-01-07 00:00:00  000001   9.74    1000  9.664482e+05   \n",
      "7   2019-01-07 00:00:00  000002  25.05   -2000  1.016486e+06   \n",
      "8   2019-01-08 00:00:00  000001   9.66   -3000  1.045429e+06   \n",
      "9   2019-01-08 00:00:00  000002  25.00   -2000  1.095367e+06   \n",
      "10  2019-01-09 00:00:00  000001   9.94    1000  1.085422e+06   \n",
      "11  2019-01-09 00:00:00  000002  25.33    1000  1.060086e+06   \n",
      "12  2019-01-10 00:00:00  000001  10.10    1000  1.049981e+06   \n",
      "13  2019-01-10 00:00:00  000002  25.11    1000  1.024864e+06   \n",
      "14  2019-01-11 00:00:00  000001  10.20    1000  1.014659e+06   \n",
      "15  2019-01-11 00:00:00  000002  25.30   -4000  1.115733e+06   \n",
      "16  2019-01-14 00:00:00  000001  10.11   -6000  1.176317e+06   \n",
      "17  2019-01-14 00:00:00  000002  25.02    1000  1.151291e+06   \n",
      "18  2019-01-15 00:00:00  000001  10.24    1000  1.141046e+06   \n",
      "19  2019-01-15 00:00:00  000002  25.16   -5000  1.266688e+06   \n",
      "20  2019-01-16 00:00:00  000001  10.48   -7000  1.339957e+06   \n",
      "21  2019-01-16 00:00:00  000002  25.42    1000  1.314530e+06   \n",
      "22  2019-01-17 00:00:00  000001  10.25   -7000  1.386191e+06   \n",
      "23  2019-01-17 00:00:00  000002  24.97    1000  1.361214e+06   \n",
      "24  2019-01-18 00:00:00  000001  10.43    1000  1.350779e+06   \n",
      "25  2019-01-18 00:00:00  000002  25.76    1000  1.325013e+06   \n",
      "26  2019-01-21 00:00:00  000001  10.34   -8000  1.407630e+06   \n",
      "27  2019-01-21 00:00:00  000002  25.65   -8000  1.612573e+06   \n",
      "28  2019-01-22 00:00:00  000001  10.28   -8000  1.694710e+06   \n",
      "29  2019-01-22 00:00:00  000002  25.40   -8000  1.897656e+06   \n",
      "30  2019-01-23 00:00:00  000001  10.35   -8000  1.980353e+06   \n",
      "\n",
      "                                order_id realorder_id trade_id account_cookie  \\\n",
      "0   e23f9e01-e8d2-4a05-93ef-9163ce7a83ee         None     None              x   \n",
      "1   1f430faa-86d1-440b-abf7-a7feddc17954         None     None              x   \n",
      "2   0230d608-91cc-422e-8deb-218f4faef3d7         None     None              x   \n",
      "3   427f1eed-b3bd-4078-94e3-156bf3ae21a6         None     None              x   \n",
      "4   48fd88b8-e3c0-4df5-94ef-62b936345bd9         None     None              x   \n",
      "5   d9aff179-9bc3-4268-b2d5-37eee8de309f         None     None              x   \n",
      "6   41f23955-b920-4f04-bcb7-ca1cd960aa45         None     None              x   \n",
      "7   cb2fdd74-7326-41d9-812f-9d88da447741         None     None              x   \n",
      "8   8ef82ee7-87b8-4f7d-8a01-374f52b60cbb         None     None              x   \n",
      "9   1f63fa52-f56b-4814-8eb3-5e4de849f3cb         None     None              x   \n",
      "10  13e77d45-9e2c-4ef3-89f5-7fa63cc3b808         None     None              x   \n",
      "11  7e714c35-83a4-4cb4-8ab5-d4fb2b31ccb7         None     None              x   \n",
      "12  380f932e-7871-4c72-94d3-5077861c9f53         None     None              x   \n",
      "13  3966e418-9017-4565-b24f-ed9455ef5593         None     None              x   \n",
      "14  99048106-f032-45a2-92c6-5a076f899a8a         None     None              x   \n",
      "15  3529f52a-3c09-46fc-944d-b3c619af7cd7         None     None              x   \n",
      "16  650c29d4-459c-412a-8000-c881af3c662a         None     None              x   \n",
      "17  9d0b7e50-53ac-42df-9175-c3f303387629         None     None              x   \n",
      "18  80ac049d-602e-44ff-a799-3be84acdfe55         None     None              x   \n",
      "19  e354ff47-4298-4d5a-a22e-794e327dee61         None     None              x   \n",
      "20  4977e6e3-e6ee-4d8c-8c43-9b1f027e07b1         None     None              x   \n",
      "21  16d8792c-b2f0-400d-b2a6-aa5c2e473728         None     None              x   \n",
      "22  eff96ddf-6dbb-4af3-a7bd-1f170e632dbc         None     None              x   \n",
      "23  7b21c653-d1d1-44d8-9772-790585915ae4         None     None              x   \n",
      "24  dfe8fbac-ff27-4746-a53a-f6220f3c63a6         None     None              x   \n",
      "25  98e05d3a-cdf5-4cac-bd41-fa747e29a2a4         None     None              x   \n",
      "26  23cd8f74-342a-4796-aeeb-07441bed75e1         None     None              x   \n",
      "27  3f7dad60-3de4-4ca9-ba5e-af87d33594e6         None     None              x   \n",
      "28  f2b9cae9-b1d9-4a00-ba62-ce81baec3d72         None     None              x   \n",
      "29  de5fce65-5a39-42c6-8d6e-914060c5f971         None     None              x   \n",
      "30  3d763d03-c042-4312-a7e3-ffae8fb877b4         None     None              x   \n",
      "\n",
      "    commission     tax message  frozen  direction  total_frozen  \n",
      "0       5.0000    0.00    None       0          1             0  \n",
      "1       5.9750    0.00    None       0          1             0  \n",
      "2       5.0000    0.00    None       0          1             0  \n",
      "3       6.0175   24.07    None       0         -1             0  \n",
      "4       5.0000   19.50    None       0         -1             0  \n",
      "5       6.2325    0.00    None       0          1             0  \n",
      "6       5.0000    0.00    None       0          1             0  \n",
      "7      12.5250   50.10    None       0         -1             0  \n",
      "8       7.2450   28.98    None       0         -1             0  \n",
      "9      12.5000   50.00    None       0         -1             0  \n",
      "10      5.0000    0.00    None       0          1             0  \n",
      "11      6.3325    0.00    None       0          1             0  \n",
      "12      5.0000    0.00    None       0          1             0  \n",
      "13      6.2775    0.00    None       0          1             0  \n",
      "14      5.0000    0.00    None       0          1             0  \n",
      "15     25.3000  101.20    None       0         -1             0  \n",
      "16     15.1650   60.66    None       0         -1             0  \n",
      "17      6.2550    0.00    None       0          1             0  \n",
      "18      5.0000    0.00    None       0          1             0  \n",
      "19     31.4500  125.80    None       0         -1             0  \n",
      "20     18.3400   73.36    None       0         -1             0  \n",
      "21      6.3550    0.00    None       0          1             0  \n",
      "22     17.9375   71.75    None       0         -1             0  \n",
      "23      6.2425    0.00    None       0          1             0  \n",
      "24      5.0000    0.00    None       0          1             0  \n",
      "25      6.4400    0.00    None       0          1             0  \n",
      "26     20.6800   82.72    None       0         -1             0  \n",
      "27     51.3000  205.20    None       0         -1             0  \n",
      "28     20.5600   82.24    None       0         -1             0  \n",
      "29     50.8000  203.20    None       0         -1             0  \n",
      "30     20.7000   82.80    None       0         -1             0  \n"
     ]
    },
    {
     "name": "stdin",
     "output_type": "stream",
     "text": [
      " \n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "open      2.535000e+01\n",
      "high      2.549000e+01\n",
      "low       2.520000e+01\n",
      "close     2.531000e+01\n",
      "volume    1.468470e+05\n",
      "amount    3.718901e+08\n",
      "Name: (2019-01-23 00:00:00, 000002), dtype: float64\n",
      "---------------under is 当前全市场的market_data --------------\n",
      "                    open   high    low  close    volume       amount\n",
      "2019-01-23 000001  10.29  10.47  10.29  10.35  537876.0  559384384.0\n",
      "           000002  25.35  25.49  25.20  25.31  146847.0  371890080.0\n",
      "---------------under is 当前品种的market_data --------------\n",
      "                    open   high    low  close    volume        amount\n",
      "2019-01-02 000002  23.83  24.09  23.67  23.90  247010.0  5.893846e+08\n",
      "2019-01-03 000002  23.79  24.50  23.71  24.07  222353.0  5.363333e+08\n",
      "2019-01-04 000002  23.91  25.00  23.85  24.93  377727.0  9.270117e+08\n",
      "2019-01-07 000002  25.29  25.53  24.99  25.05  427154.0  1.077909e+09\n",
      "2019-01-08 000002  25.05  25.20  24.63  25.00  214382.0  5.336044e+08\n",
      "2019-01-09 000002  25.40  25.88  25.11  25.33  340140.0  8.670814e+08\n",
      "2019-01-10 000002  25.22  25.56  25.03  25.11  224649.0  5.689526e+08\n",
      "2019-01-11 000002  25.10  25.54  25.01  25.30  240694.0  6.069947e+08\n",
      "2019-01-14 000002  25.13  25.30  24.92  25.02  183281.0  4.591518e+08\n",
      "2019-01-15 000002  25.00  25.16  24.32  25.16  368758.0  9.149835e+08\n",
      "2019-01-16 000002  25.15  25.50  24.83  25.42  267466.0  6.766856e+08\n",
      "2019-01-17 000002  25.50  25.50  24.94  24.97  245895.0  6.188767e+08\n",
      "2019-01-18 000002  25.00  25.76  24.99  25.76  365723.0  9.334642e+08\n",
      "2019-01-21 000002  25.71  25.95  25.40  25.65  255499.0  6.558207e+08\n",
      "2019-01-22 000002  25.50  26.17  25.23  25.40  379336.0  9.748227e+08\n",
      "2019-01-23 000002  25.35  25.49  25.20  25.31  146847.0  3.718901e+08\n",
      "000002\n",
      "---------------under is 账户情况和持仓情况 -------------------\n",
      "{'code': '000002', 'instrument_id': '000002', 'user_id': 'x', 'portfolio_cookie': 'default', 'username': 'quantaxis', 'position_id': '5aa694d0-3861-43a8-9efc-84f380138bea', 'account_cookie': 'x', 'frozen': {}, 'name': None, 'spms_id': None, 'oms_id': None, 'market_type': 'stock_cn', 'exchange_id': None, 'moneypreset': 100000, 'moneypresetLeft': 100000, 'lastupdatetime': '', 'volume_long_today': 9000, 'volume_long_his': 0, 'volume_long': 9000, 'volume_short_today': 0, 'volume_short_his': 0, 'volume_short': 0, 'volume_long_frozen_today': 0, 'volume_long_frozen_his': 0, 'volume_long_frozen': 0, 'volume_short_frozen_today': 0, 'volume_short_frozen_his': 0, 'volume_short_frozen': 0, 'margin_long': 225750.0, 'margin_short': 0, 'margin': 225750.0, 'position_price_long': 25.083333333333332, 'position_cost_long': 225750.0, 'position_price_short': 0, 'position_cost_short': 0, 'open_price_long': 25.083333333333332, 'open_cost_long': 225750.0, 'open_price_short': 0, 'open_cost_short': 0, 'trades': [], 'orders': {}, 'last_price': 25.31, 'float_profit_long': 2040.0, 'float_profit_short': 0.0, 'float_profit': 2040.0, 'position_profit_long': 2040.0, 'position_profit_short': 0.0, 'position_profit': 2040.0}\n",
      "               datetime    code  price  amount          cash  \\\n",
      "0   2019-01-02 00:00:00  000001   9.19    1000  9.908050e+05   \n",
      "1   2019-01-02 00:00:00  000002  23.90    1000  9.668990e+05   \n",
      "2   2019-01-03 00:00:00  000001   9.28    1000  9.576140e+05   \n",
      "3   2019-01-03 00:00:00  000002  24.07   -1000  9.816539e+05   \n",
      "4   2019-01-04 00:00:00  000001   9.75   -2000  1.001129e+06   \n",
      "5   2019-01-04 00:00:00  000002  24.93    1000  9.761932e+05   \n",
      "6   2019-01-07 00:00:00  000001   9.74    1000  9.664482e+05   \n",
      "7   2019-01-07 00:00:00  000002  25.05   -2000  1.016486e+06   \n",
      "8   2019-01-08 00:00:00  000001   9.66   -3000  1.045429e+06   \n",
      "9   2019-01-08 00:00:00  000002  25.00   -2000  1.095367e+06   \n",
      "10  2019-01-09 00:00:00  000001   9.94    1000  1.085422e+06   \n",
      "11  2019-01-09 00:00:00  000002  25.33    1000  1.060086e+06   \n",
      "12  2019-01-10 00:00:00  000001  10.10    1000  1.049981e+06   \n",
      "13  2019-01-10 00:00:00  000002  25.11    1000  1.024864e+06   \n",
      "14  2019-01-11 00:00:00  000001  10.20    1000  1.014659e+06   \n",
      "15  2019-01-11 00:00:00  000002  25.30   -4000  1.115733e+06   \n",
      "16  2019-01-14 00:00:00  000001  10.11   -6000  1.176317e+06   \n",
      "17  2019-01-14 00:00:00  000002  25.02    1000  1.151291e+06   \n",
      "18  2019-01-15 00:00:00  000001  10.24    1000  1.141046e+06   \n",
      "19  2019-01-15 00:00:00  000002  25.16   -5000  1.266688e+06   \n",
      "20  2019-01-16 00:00:00  000001  10.48   -7000  1.339957e+06   \n",
      "21  2019-01-16 00:00:00  000002  25.42    1000  1.314530e+06   \n",
      "22  2019-01-17 00:00:00  000001  10.25   -7000  1.386191e+06   \n",
      "23  2019-01-17 00:00:00  000002  24.97    1000  1.361214e+06   \n",
      "24  2019-01-18 00:00:00  000001  10.43    1000  1.350779e+06   \n",
      "25  2019-01-18 00:00:00  000002  25.76    1000  1.325013e+06   \n",
      "26  2019-01-21 00:00:00  000001  10.34   -8000  1.407630e+06   \n",
      "27  2019-01-21 00:00:00  000002  25.65   -8000  1.612573e+06   \n",
      "28  2019-01-22 00:00:00  000001  10.28   -8000  1.694710e+06   \n",
      "29  2019-01-22 00:00:00  000002  25.40   -8000  1.897656e+06   \n",
      "30  2019-01-23 00:00:00  000001  10.35   -8000  1.980353e+06   \n",
      "31  2019-01-23 00:00:00  000002  25.31    1000  1.955036e+06   \n",
      "\n",
      "                                order_id realorder_id trade_id account_cookie  \\\n",
      "0   e23f9e01-e8d2-4a05-93ef-9163ce7a83ee         None     None              x   \n",
      "1   1f430faa-86d1-440b-abf7-a7feddc17954         None     None              x   \n",
      "2   0230d608-91cc-422e-8deb-218f4faef3d7         None     None              x   \n",
      "3   427f1eed-b3bd-4078-94e3-156bf3ae21a6         None     None              x   \n",
      "4   48fd88b8-e3c0-4df5-94ef-62b936345bd9         None     None              x   \n",
      "5   d9aff179-9bc3-4268-b2d5-37eee8de309f         None     None              x   \n",
      "6   41f23955-b920-4f04-bcb7-ca1cd960aa45         None     None              x   \n",
      "7   cb2fdd74-7326-41d9-812f-9d88da447741         None     None              x   \n",
      "8   8ef82ee7-87b8-4f7d-8a01-374f52b60cbb         None     None              x   \n",
      "9   1f63fa52-f56b-4814-8eb3-5e4de849f3cb         None     None              x   \n",
      "10  13e77d45-9e2c-4ef3-89f5-7fa63cc3b808         None     None              x   \n",
      "11  7e714c35-83a4-4cb4-8ab5-d4fb2b31ccb7         None     None              x   \n",
      "12  380f932e-7871-4c72-94d3-5077861c9f53         None     None              x   \n",
      "13  3966e418-9017-4565-b24f-ed9455ef5593         None     None              x   \n",
      "14  99048106-f032-45a2-92c6-5a076f899a8a         None     None              x   \n",
      "15  3529f52a-3c09-46fc-944d-b3c619af7cd7         None     None              x   \n",
      "16  650c29d4-459c-412a-8000-c881af3c662a         None     None              x   \n",
      "17  9d0b7e50-53ac-42df-9175-c3f303387629         None     None              x   \n",
      "18  80ac049d-602e-44ff-a799-3be84acdfe55         None     None              x   \n",
      "19  e354ff47-4298-4d5a-a22e-794e327dee61         None     None              x   \n",
      "20  4977e6e3-e6ee-4d8c-8c43-9b1f027e07b1         None     None              x   \n",
      "21  16d8792c-b2f0-400d-b2a6-aa5c2e473728         None     None              x   \n",
      "22  eff96ddf-6dbb-4af3-a7bd-1f170e632dbc         None     None              x   \n",
      "23  7b21c653-d1d1-44d8-9772-790585915ae4         None     None              x   \n",
      "24  dfe8fbac-ff27-4746-a53a-f6220f3c63a6         None     None              x   \n",
      "25  98e05d3a-cdf5-4cac-bd41-fa747e29a2a4         None     None              x   \n",
      "26  23cd8f74-342a-4796-aeeb-07441bed75e1         None     None              x   \n",
      "27  3f7dad60-3de4-4ca9-ba5e-af87d33594e6         None     None              x   \n",
      "28  f2b9cae9-b1d9-4a00-ba62-ce81baec3d72         None     None              x   \n",
      "29  de5fce65-5a39-42c6-8d6e-914060c5f971         None     None              x   \n",
      "30  3d763d03-c042-4312-a7e3-ffae8fb877b4         None     None              x   \n",
      "31  d41375b6-70c1-4b71-9eab-0ae5f1763fd2         None     None              x   \n",
      "\n",
      "    commission     tax message  frozen  direction  total_frozen  \n",
      "0       5.0000    0.00    None       0          1             0  \n",
      "1       5.9750    0.00    None       0          1             0  \n",
      "2       5.0000    0.00    None       0          1             0  \n",
      "3       6.0175   24.07    None       0         -1             0  \n",
      "4       5.0000   19.50    None       0         -1             0  \n",
      "5       6.2325    0.00    None       0          1             0  \n",
      "6       5.0000    0.00    None       0          1             0  \n",
      "7      12.5250   50.10    None       0         -1             0  \n",
      "8       7.2450   28.98    None       0         -1             0  \n",
      "9      12.5000   50.00    None       0         -1             0  \n",
      "10      5.0000    0.00    None       0          1             0  \n",
      "11      6.3325    0.00    None       0          1             0  \n",
      "12      5.0000    0.00    None       0          1             0  \n",
      "13      6.2775    0.00    None       0          1             0  \n",
      "14      5.0000    0.00    None       0          1             0  \n",
      "15     25.3000  101.20    None       0         -1             0  \n",
      "16     15.1650   60.66    None       0         -1             0  \n",
      "17      6.2550    0.00    None       0          1             0  \n",
      "18      5.0000    0.00    None       0          1             0  \n",
      "19     31.4500  125.80    None       0         -1             0  \n",
      "20     18.3400   73.36    None       0         -1             0  \n",
      "21      6.3550    0.00    None       0          1             0  \n",
      "22     17.9375   71.75    None       0         -1             0  \n",
      "23      6.2425    0.00    None       0          1             0  \n",
      "24      5.0000    0.00    None       0          1             0  \n",
      "25      6.4400    0.00    None       0          1             0  \n",
      "26     20.6800   82.72    None       0         -1             0  \n",
      "27     51.3000  205.20    None       0         -1             0  \n",
      "28     20.5600   82.24    None       0         -1             0  \n",
      "29     50.8000  203.20    None       0         -1             0  \n",
      "30     20.7000   82.80    None       0         -1             0  \n",
      "31      6.3275    0.00    None       0          1             0  \n"
     ]
    },
    {
     "name": "stdin",
     "output_type": "stream",
     "text": [
      " \n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "backtest: Settle!\n",
      "open      1.040000e+01\n",
      "high      1.055000e+01\n",
      "low       1.037000e+01\n",
      "close     1.052000e+01\n",
      "volume    6.792400e+05\n",
      "amount    7.114957e+08\n",
      "Name: (2019-01-24 00:00:00, 000001), dtype: float64\n",
      "---------------under is 当前全市场的market_data --------------\n",
      "                   open   high    low  close    volume       amount\n",
      "2019-01-24 000001  10.4  10.55  10.37  10.52  679240.0  711495744.0\n",
      "---------------under is 当前品种的market_data --------------\n",
      "                    open   high    low  close     volume        amount\n",
      "2019-01-02 000001   9.39   9.42   9.16   9.19   539386.0  4.986951e+08\n",
      "2019-01-03 000001   9.18   9.33   9.15   9.28   415537.0  3.844577e+08\n",
      "2019-01-04 000001   9.24   9.82   9.22   9.75  1481159.0  1.422150e+09\n",
      "2019-01-07 000001   9.84   9.85   9.63   9.74   865687.0  8.411664e+08\n",
      "2019-01-08 000001   9.73   9.74   9.62   9.66   402388.0  3.892478e+08\n",
      "2019-01-09 000001   9.74  10.08   9.70   9.94  1233486.0  1.229465e+09\n",
      "2019-01-10 000001   9.87  10.20   9.86  10.10  1071817.0  1.079711e+09\n",
      "2019-01-11 000001  10.11  10.22  10.05  10.20   696364.0  7.080018e+08\n",
      "2019-01-14 000001  10.22  10.25  10.07  10.11   500443.0  5.078629e+08\n",
      "2019-01-15 000001  10.11  10.28  10.09  10.24   542160.0  5.530273e+08\n",
      "2019-01-16 000001  10.24  10.50  10.23  10.48   977699.0  1.017495e+09\n",
      "2019-01-17 000001  10.54  10.57  10.17  10.25   882811.0  9.102121e+08\n",
      "2019-01-18 000001  10.34  10.49  10.28  10.43   738793.0  7.699736e+08\n",
      "2019-01-21 000001  10.34  10.47  10.32  10.34   659355.0  6.844657e+08\n",
      "2019-01-22 000001  10.34  10.44  10.26  10.28   424413.0  4.389915e+08\n",
      "2019-01-23 000001  10.29  10.47  10.29  10.35   537876.0  5.593844e+08\n",
      "2019-01-24 000001  10.40  10.55  10.37  10.52   679240.0  7.114957e+08\n",
      "000001\n",
      "---------------under is 账户情况和持仓情况 -------------------\n",
      "{'code': '000001', 'instrument_id': '000001', 'user_id': 'x', 'portfolio_cookie': 'default', 'username': 'quantaxis', 'position_id': 'd2b24d5c-fb1e-4a2e-97eb-f19b04f544ec', 'account_cookie': 'x', 'frozen': {}, 'name': None, 'spms_id': None, 'oms_id': None, 'market_type': 'stock_cn', 'exchange_id': None, 'moneypreset': 100000, 'moneypresetLeft': 100000, 'lastupdatetime': '', 'volume_long_today': 8000, 'volume_long_his': 0, 'volume_long': 8000, 'volume_short_today': 0, 'volume_short_his': 0, 'volume_short': 0, 'volume_long_frozen_today': 0, 'volume_long_frozen_his': 0, 'volume_long_frozen': 0, 'volume_short_frozen_today': 0, 'volume_short_frozen_his': 0, 'volume_short_frozen': 0, 'margin_long': 79120.0, 'margin_short': 0, 'margin': 79120.0, 'position_price_long': 9.89, 'position_cost_long': 79120.0, 'position_price_short': 0, 'position_cost_short': 0, 'open_price_long': 9.89, 'open_cost_long': 79120.0, 'open_price_short': 0, 'open_cost_short': 0, 'trades': [], 'orders': {}, 'last_price': 10.52, 'float_profit_long': 5040.0, 'float_profit_short': 0.0, 'float_profit': 5040.0, 'position_profit_long': 5040.0, 'position_profit_short': 0.0, 'position_profit': 5040.0}\n",
      "               datetime    code  price  amount          cash  \\\n",
      "0   2019-01-02 00:00:00  000001   9.19    1000  9.908050e+05   \n",
      "1   2019-01-02 00:00:00  000002  23.90    1000  9.668990e+05   \n",
      "2   2019-01-03 00:00:00  000001   9.28    1000  9.576140e+05   \n",
      "3   2019-01-03 00:00:00  000002  24.07   -1000  9.816539e+05   \n",
      "4   2019-01-04 00:00:00  000001   9.75   -2000  1.001129e+06   \n",
      "5   2019-01-04 00:00:00  000002  24.93    1000  9.761932e+05   \n",
      "6   2019-01-07 00:00:00  000001   9.74    1000  9.664482e+05   \n",
      "7   2019-01-07 00:00:00  000002  25.05   -2000  1.016486e+06   \n",
      "8   2019-01-08 00:00:00  000001   9.66   -3000  1.045429e+06   \n",
      "9   2019-01-08 00:00:00  000002  25.00   -2000  1.095367e+06   \n",
      "10  2019-01-09 00:00:00  000001   9.94    1000  1.085422e+06   \n",
      "11  2019-01-09 00:00:00  000002  25.33    1000  1.060086e+06   \n",
      "12  2019-01-10 00:00:00  000001  10.10    1000  1.049981e+06   \n",
      "13  2019-01-10 00:00:00  000002  25.11    1000  1.024864e+06   \n",
      "14  2019-01-11 00:00:00  000001  10.20    1000  1.014659e+06   \n",
      "15  2019-01-11 00:00:00  000002  25.30   -4000  1.115733e+06   \n",
      "16  2019-01-14 00:00:00  000001  10.11   -6000  1.176317e+06   \n",
      "17  2019-01-14 00:00:00  000002  25.02    1000  1.151291e+06   \n",
      "18  2019-01-15 00:00:00  000001  10.24    1000  1.141046e+06   \n",
      "19  2019-01-15 00:00:00  000002  25.16   -5000  1.266688e+06   \n",
      "20  2019-01-16 00:00:00  000001  10.48   -7000  1.339957e+06   \n",
      "21  2019-01-16 00:00:00  000002  25.42    1000  1.314530e+06   \n",
      "22  2019-01-17 00:00:00  000001  10.25   -7000  1.386191e+06   \n",
      "23  2019-01-17 00:00:00  000002  24.97    1000  1.361214e+06   \n",
      "24  2019-01-18 00:00:00  000001  10.43    1000  1.350779e+06   \n",
      "25  2019-01-18 00:00:00  000002  25.76    1000  1.325013e+06   \n",
      "26  2019-01-21 00:00:00  000001  10.34   -8000  1.407630e+06   \n",
      "27  2019-01-21 00:00:00  000002  25.65   -8000  1.612573e+06   \n",
      "28  2019-01-22 00:00:00  000001  10.28   -8000  1.694710e+06   \n",
      "29  2019-01-22 00:00:00  000002  25.40   -8000  1.897656e+06   \n",
      "30  2019-01-23 00:00:00  000001  10.35   -8000  1.980353e+06   \n",
      "31  2019-01-23 00:00:00  000002  25.31    1000  1.955036e+06   \n",
      "32  2019-01-24 00:00:00  000001  10.52   -8000  2.039091e+06   \n",
      "\n",
      "                                order_id realorder_id trade_id account_cookie  \\\n",
      "0   e23f9e01-e8d2-4a05-93ef-9163ce7a83ee         None     None              x   \n",
      "1   1f430faa-86d1-440b-abf7-a7feddc17954         None     None              x   \n",
      "2   0230d608-91cc-422e-8deb-218f4faef3d7         None     None              x   \n",
      "3   427f1eed-b3bd-4078-94e3-156bf3ae21a6         None     None              x   \n",
      "4   48fd88b8-e3c0-4df5-94ef-62b936345bd9         None     None              x   \n",
      "5   d9aff179-9bc3-4268-b2d5-37eee8de309f         None     None              x   \n",
      "6   41f23955-b920-4f04-bcb7-ca1cd960aa45         None     None              x   \n",
      "7   cb2fdd74-7326-41d9-812f-9d88da447741         None     None              x   \n",
      "8   8ef82ee7-87b8-4f7d-8a01-374f52b60cbb         None     None              x   \n",
      "9   1f63fa52-f56b-4814-8eb3-5e4de849f3cb         None     None              x   \n",
      "10  13e77d45-9e2c-4ef3-89f5-7fa63cc3b808         None     None              x   \n",
      "11  7e714c35-83a4-4cb4-8ab5-d4fb2b31ccb7         None     None              x   \n",
      "12  380f932e-7871-4c72-94d3-5077861c9f53         None     None              x   \n",
      "13  3966e418-9017-4565-b24f-ed9455ef5593         None     None              x   \n",
      "14  99048106-f032-45a2-92c6-5a076f899a8a         None     None              x   \n",
      "15  3529f52a-3c09-46fc-944d-b3c619af7cd7         None     None              x   \n",
      "16  650c29d4-459c-412a-8000-c881af3c662a         None     None              x   \n",
      "17  9d0b7e50-53ac-42df-9175-c3f303387629         None     None              x   \n",
      "18  80ac049d-602e-44ff-a799-3be84acdfe55         None     None              x   \n",
      "19  e354ff47-4298-4d5a-a22e-794e327dee61         None     None              x   \n",
      "20  4977e6e3-e6ee-4d8c-8c43-9b1f027e07b1         None     None              x   \n",
      "21  16d8792c-b2f0-400d-b2a6-aa5c2e473728         None     None              x   \n",
      "22  eff96ddf-6dbb-4af3-a7bd-1f170e632dbc         None     None              x   \n",
      "23  7b21c653-d1d1-44d8-9772-790585915ae4         None     None              x   \n",
      "24  dfe8fbac-ff27-4746-a53a-f6220f3c63a6         None     None              x   \n",
      "25  98e05d3a-cdf5-4cac-bd41-fa747e29a2a4         None     None              x   \n",
      "26  23cd8f74-342a-4796-aeeb-07441bed75e1         None     None              x   \n",
      "27  3f7dad60-3de4-4ca9-ba5e-af87d33594e6         None     None              x   \n",
      "28  f2b9cae9-b1d9-4a00-ba62-ce81baec3d72         None     None              x   \n",
      "29  de5fce65-5a39-42c6-8d6e-914060c5f971         None     None              x   \n",
      "30  3d763d03-c042-4312-a7e3-ffae8fb877b4         None     None              x   \n",
      "31  d41375b6-70c1-4b71-9eab-0ae5f1763fd2         None     None              x   \n",
      "32  3fc5cbfd-354e-4f68-9248-a0853a763435         None     None              x   \n",
      "\n",
      "    commission     tax message  frozen  direction  total_frozen  \n",
      "0       5.0000    0.00    None       0          1             0  \n",
      "1       5.9750    0.00    None       0          1             0  \n",
      "2       5.0000    0.00    None       0          1             0  \n",
      "3       6.0175   24.07    None       0         -1             0  \n",
      "4       5.0000   19.50    None       0         -1             0  \n",
      "5       6.2325    0.00    None       0          1             0  \n",
      "6       5.0000    0.00    None       0          1             0  \n",
      "7      12.5250   50.10    None       0         -1             0  \n",
      "8       7.2450   28.98    None       0         -1             0  \n",
      "9      12.5000   50.00    None       0         -1             0  \n",
      "10      5.0000    0.00    None       0          1             0  \n",
      "11      6.3325    0.00    None       0          1             0  \n",
      "12      5.0000    0.00    None       0          1             0  \n",
      "13      6.2775    0.00    None       0          1             0  \n",
      "14      5.0000    0.00    None       0          1             0  \n",
      "15     25.3000  101.20    None       0         -1             0  \n",
      "16     15.1650   60.66    None       0         -1             0  \n",
      "17      6.2550    0.00    None       0          1             0  \n",
      "18      5.0000    0.00    None       0          1             0  \n",
      "19     31.4500  125.80    None       0         -1             0  \n",
      "20     18.3400   73.36    None       0         -1             0  \n",
      "21      6.3550    0.00    None       0          1             0  \n",
      "22     17.9375   71.75    None       0         -1             0  \n",
      "23      6.2425    0.00    None       0          1             0  \n",
      "24      5.0000    0.00    None       0          1             0  \n",
      "25      6.4400    0.00    None       0          1             0  \n",
      "26     20.6800   82.72    None       0         -1             0  \n",
      "27     51.3000  205.20    None       0         -1             0  \n",
      "28     20.5600   82.24    None       0         -1             0  \n",
      "29     50.8000  203.20    None       0         -1             0  \n",
      "30     20.7000   82.80    None       0         -1             0  \n",
      "31      6.3275    0.00    None       0          1             0  \n",
      "32     21.0400   84.16    None       0         -1             0  \n"
     ]
    },
    {
     "name": "stdin",
     "output_type": "stream",
     "text": [
      " \n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "open      2.542000e+01\n",
      "high      2.554000e+01\n",
      "low       2.493000e+01\n",
      "close     2.541000e+01\n",
      "volume    2.349310e+05\n",
      "amount    5.928229e+08\n",
      "Name: (2019-01-24 00:00:00, 000002), dtype: float64\n",
      "---------------under is 当前全市场的market_data --------------\n",
      "                    open   high    low  close    volume       amount\n",
      "2019-01-24 000001  10.40  10.55  10.37  10.52  679240.0  711495744.0\n",
      "           000002  25.42  25.54  24.93  25.41  234931.0  592822912.0\n",
      "---------------under is 当前品种的market_data --------------\n",
      "                    open   high    low  close    volume        amount\n",
      "2019-01-02 000002  23.83  24.09  23.67  23.90  247010.0  5.893846e+08\n",
      "2019-01-03 000002  23.79  24.50  23.71  24.07  222353.0  5.363333e+08\n",
      "2019-01-04 000002  23.91  25.00  23.85  24.93  377727.0  9.270117e+08\n",
      "2019-01-07 000002  25.29  25.53  24.99  25.05  427154.0  1.077909e+09\n",
      "2019-01-08 000002  25.05  25.20  24.63  25.00  214382.0  5.336044e+08\n",
      "2019-01-09 000002  25.40  25.88  25.11  25.33  340140.0  8.670814e+08\n",
      "2019-01-10 000002  25.22  25.56  25.03  25.11  224649.0  5.689526e+08\n",
      "2019-01-11 000002  25.10  25.54  25.01  25.30  240694.0  6.069947e+08\n",
      "2019-01-14 000002  25.13  25.30  24.92  25.02  183281.0  4.591518e+08\n",
      "2019-01-15 000002  25.00  25.16  24.32  25.16  368758.0  9.149835e+08\n",
      "2019-01-16 000002  25.15  25.50  24.83  25.42  267466.0  6.766856e+08\n",
      "2019-01-17 000002  25.50  25.50  24.94  24.97  245895.0  6.188767e+08\n",
      "2019-01-18 000002  25.00  25.76  24.99  25.76  365723.0  9.334642e+08\n",
      "2019-01-21 000002  25.71  25.95  25.40  25.65  255499.0  6.558207e+08\n",
      "2019-01-22 000002  25.50  26.17  25.23  25.40  379336.0  9.748227e+08\n",
      "2019-01-23 000002  25.35  25.49  25.20  25.31  146847.0  3.718901e+08\n",
      "2019-01-24 000002  25.42  25.54  24.93  25.41  234931.0  5.928229e+08\n",
      "000002\n",
      "---------------under is 账户情况和持仓情况 -------------------\n",
      "{'code': '000002', 'instrument_id': '000002', 'user_id': 'x', 'portfolio_cookie': 'default', 'username': 'quantaxis', 'position_id': '5aa694d0-3861-43a8-9efc-84f380138bea', 'account_cookie': 'x', 'frozen': {}, 'name': None, 'spms_id': None, 'oms_id': None, 'market_type': 'stock_cn', 'exchange_id': None, 'moneypreset': 100000, 'moneypresetLeft': 100000, 'lastupdatetime': '', 'volume_long_today': 9000, 'volume_long_his': 0, 'volume_long': 9000, 'volume_short_today': 0, 'volume_short_his': 0, 'volume_short': 0, 'volume_long_frozen_today': 0, 'volume_long_frozen_his': 0, 'volume_long_frozen': 0, 'volume_short_frozen_today': 0, 'volume_short_frozen_his': 0, 'volume_short_frozen': 0, 'margin_long': 225750.0, 'margin_short': 0, 'margin': 225750.0, 'position_price_long': 25.083333333333332, 'position_cost_long': 225750.0, 'position_price_short': 0, 'position_cost_short': 0, 'open_price_long': 25.083333333333332, 'open_cost_long': 225750.0, 'open_price_short': 0, 'open_cost_short': 0, 'trades': [], 'orders': {}, 'last_price': 25.41, 'float_profit_long': 2940.0, 'float_profit_short': 0.0, 'float_profit': 2940.0, 'position_profit_long': 2940.0, 'position_profit_short': 0.0, 'position_profit': 2940.0}\n",
      "               datetime    code  price  amount          cash  \\\n",
      "0   2019-01-02 00:00:00  000001   9.19    1000  9.908050e+05   \n",
      "1   2019-01-02 00:00:00  000002  23.90    1000  9.668990e+05   \n",
      "2   2019-01-03 00:00:00  000001   9.28    1000  9.576140e+05   \n",
      "3   2019-01-03 00:00:00  000002  24.07   -1000  9.816539e+05   \n",
      "4   2019-01-04 00:00:00  000001   9.75   -2000  1.001129e+06   \n",
      "5   2019-01-04 00:00:00  000002  24.93    1000  9.761932e+05   \n",
      "6   2019-01-07 00:00:00  000001   9.74    1000  9.664482e+05   \n",
      "7   2019-01-07 00:00:00  000002  25.05   -2000  1.016486e+06   \n",
      "8   2019-01-08 00:00:00  000001   9.66   -3000  1.045429e+06   \n",
      "9   2019-01-08 00:00:00  000002  25.00   -2000  1.095367e+06   \n",
      "10  2019-01-09 00:00:00  000001   9.94    1000  1.085422e+06   \n",
      "11  2019-01-09 00:00:00  000002  25.33    1000  1.060086e+06   \n",
      "12  2019-01-10 00:00:00  000001  10.10    1000  1.049981e+06   \n",
      "13  2019-01-10 00:00:00  000002  25.11    1000  1.024864e+06   \n",
      "14  2019-01-11 00:00:00  000001  10.20    1000  1.014659e+06   \n",
      "15  2019-01-11 00:00:00  000002  25.30   -4000  1.115733e+06   \n",
      "16  2019-01-14 00:00:00  000001  10.11   -6000  1.176317e+06   \n",
      "17  2019-01-14 00:00:00  000002  25.02    1000  1.151291e+06   \n",
      "18  2019-01-15 00:00:00  000001  10.24    1000  1.141046e+06   \n",
      "19  2019-01-15 00:00:00  000002  25.16   -5000  1.266688e+06   \n",
      "20  2019-01-16 00:00:00  000001  10.48   -7000  1.339957e+06   \n",
      "21  2019-01-16 00:00:00  000002  25.42    1000  1.314530e+06   \n",
      "22  2019-01-17 00:00:00  000001  10.25   -7000  1.386191e+06   \n",
      "23  2019-01-17 00:00:00  000002  24.97    1000  1.361214e+06   \n",
      "24  2019-01-18 00:00:00  000001  10.43    1000  1.350779e+06   \n",
      "25  2019-01-18 00:00:00  000002  25.76    1000  1.325013e+06   \n",
      "26  2019-01-21 00:00:00  000001  10.34   -8000  1.407630e+06   \n",
      "27  2019-01-21 00:00:00  000002  25.65   -8000  1.612573e+06   \n",
      "28  2019-01-22 00:00:00  000001  10.28   -8000  1.694710e+06   \n",
      "29  2019-01-22 00:00:00  000002  25.40   -8000  1.897656e+06   \n",
      "30  2019-01-23 00:00:00  000001  10.35   -8000  1.980353e+06   \n",
      "31  2019-01-23 00:00:00  000002  25.31    1000  1.955036e+06   \n",
      "32  2019-01-24 00:00:00  000001  10.52   -8000  2.039091e+06   \n",
      "33  2019-01-24 00:00:00  000002  25.41   -9000  2.267495e+06   \n",
      "\n",
      "                                order_id realorder_id trade_id account_cookie  \\\n",
      "0   e23f9e01-e8d2-4a05-93ef-9163ce7a83ee         None     None              x   \n",
      "1   1f430faa-86d1-440b-abf7-a7feddc17954         None     None              x   \n",
      "2   0230d608-91cc-422e-8deb-218f4faef3d7         None     None              x   \n",
      "3   427f1eed-b3bd-4078-94e3-156bf3ae21a6         None     None              x   \n",
      "4   48fd88b8-e3c0-4df5-94ef-62b936345bd9         None     None              x   \n",
      "5   d9aff179-9bc3-4268-b2d5-37eee8de309f         None     None              x   \n",
      "6   41f23955-b920-4f04-bcb7-ca1cd960aa45         None     None              x   \n",
      "7   cb2fdd74-7326-41d9-812f-9d88da447741         None     None              x   \n",
      "8   8ef82ee7-87b8-4f7d-8a01-374f52b60cbb         None     None              x   \n",
      "9   1f63fa52-f56b-4814-8eb3-5e4de849f3cb         None     None              x   \n",
      "10  13e77d45-9e2c-4ef3-89f5-7fa63cc3b808         None     None              x   \n",
      "11  7e714c35-83a4-4cb4-8ab5-d4fb2b31ccb7         None     None              x   \n",
      "12  380f932e-7871-4c72-94d3-5077861c9f53         None     None              x   \n",
      "13  3966e418-9017-4565-b24f-ed9455ef5593         None     None              x   \n",
      "14  99048106-f032-45a2-92c6-5a076f899a8a         None     None              x   \n",
      "15  3529f52a-3c09-46fc-944d-b3c619af7cd7         None     None              x   \n",
      "16  650c29d4-459c-412a-8000-c881af3c662a         None     None              x   \n",
      "17  9d0b7e50-53ac-42df-9175-c3f303387629         None     None              x   \n",
      "18  80ac049d-602e-44ff-a799-3be84acdfe55         None     None              x   \n",
      "19  e354ff47-4298-4d5a-a22e-794e327dee61         None     None              x   \n",
      "20  4977e6e3-e6ee-4d8c-8c43-9b1f027e07b1         None     None              x   \n",
      "21  16d8792c-b2f0-400d-b2a6-aa5c2e473728         None     None              x   \n",
      "22  eff96ddf-6dbb-4af3-a7bd-1f170e632dbc         None     None              x   \n",
      "23  7b21c653-d1d1-44d8-9772-790585915ae4         None     None              x   \n",
      "24  dfe8fbac-ff27-4746-a53a-f6220f3c63a6         None     None              x   \n",
      "25  98e05d3a-cdf5-4cac-bd41-fa747e29a2a4         None     None              x   \n",
      "26  23cd8f74-342a-4796-aeeb-07441bed75e1         None     None              x   \n",
      "27  3f7dad60-3de4-4ca9-ba5e-af87d33594e6         None     None              x   \n",
      "28  f2b9cae9-b1d9-4a00-ba62-ce81baec3d72         None     None              x   \n",
      "29  de5fce65-5a39-42c6-8d6e-914060c5f971         None     None              x   \n",
      "30  3d763d03-c042-4312-a7e3-ffae8fb877b4         None     None              x   \n",
      "31  d41375b6-70c1-4b71-9eab-0ae5f1763fd2         None     None              x   \n",
      "32  3fc5cbfd-354e-4f68-9248-a0853a763435         None     None              x   \n",
      "33  2b065a3c-e510-4f64-ab30-c94a93a0dc51         None     None              x   \n",
      "\n",
      "    commission     tax message  frozen  direction  total_frozen  \n",
      "0       5.0000    0.00    None       0          1             0  \n",
      "1       5.9750    0.00    None       0          1             0  \n",
      "2       5.0000    0.00    None       0          1             0  \n",
      "3       6.0175   24.07    None       0         -1             0  \n",
      "4       5.0000   19.50    None       0         -1             0  \n",
      "5       6.2325    0.00    None       0          1             0  \n",
      "6       5.0000    0.00    None       0          1             0  \n",
      "7      12.5250   50.10    None       0         -1             0  \n",
      "8       7.2450   28.98    None       0         -1             0  \n",
      "9      12.5000   50.00    None       0         -1             0  \n",
      "10      5.0000    0.00    None       0          1             0  \n",
      "11      6.3325    0.00    None       0          1             0  \n",
      "12      5.0000    0.00    None       0          1             0  \n",
      "13      6.2775    0.00    None       0          1             0  \n",
      "14      5.0000    0.00    None       0          1             0  \n",
      "15     25.3000  101.20    None       0         -1             0  \n",
      "16     15.1650   60.66    None       0         -1             0  \n",
      "17      6.2550    0.00    None       0          1             0  \n",
      "18      5.0000    0.00    None       0          1             0  \n",
      "19     31.4500  125.80    None       0         -1             0  \n",
      "20     18.3400   73.36    None       0         -1             0  \n",
      "21      6.3550    0.00    None       0          1             0  \n",
      "22     17.9375   71.75    None       0         -1             0  \n",
      "23      6.2425    0.00    None       0          1             0  \n",
      "24      5.0000    0.00    None       0          1             0  \n",
      "25      6.4400    0.00    None       0          1             0  \n",
      "26     20.6800   82.72    None       0         -1             0  \n",
      "27     51.3000  205.20    None       0         -1             0  \n",
      "28     20.5600   82.24    None       0         -1             0  \n",
      "29     50.8000  203.20    None       0         -1             0  \n",
      "30     20.7000   82.80    None       0         -1             0  \n",
      "31      6.3275    0.00    None       0          1             0  \n",
      "32     21.0400   84.16    None       0         -1             0  \n",
      "33     57.1725  228.69    None       0         -1             0  \n"
     ]
    },
    {
     "name": "stdin",
     "output_type": "stream",
     "text": [
      " \n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "backtest: Settle!\n",
      "open      1.056000e+01\n",
      "high      1.104000e+01\n",
      "low       1.055000e+01\n",
      "close     1.100000e+01\n",
      "volume    2.108362e+06\n",
      "amount    2.299718e+09\n",
      "Name: (2019-01-25 00:00:00, 000001), dtype: float64\n",
      "---------------under is 当前全市场的market_data --------------\n",
      "                    open   high    low  close     volume        amount\n",
      "2019-01-25 000001  10.56  11.04  10.55   11.0  2108362.0  2.299718e+09\n",
      "---------------under is 当前品种的market_data --------------\n",
      "                    open   high    low  close     volume        amount\n",
      "2019-01-02 000001   9.39   9.42   9.16   9.19   539386.0  4.986951e+08\n",
      "2019-01-03 000001   9.18   9.33   9.15   9.28   415537.0  3.844577e+08\n",
      "2019-01-04 000001   9.24   9.82   9.22   9.75  1481159.0  1.422150e+09\n",
      "2019-01-07 000001   9.84   9.85   9.63   9.74   865687.0  8.411664e+08\n",
      "2019-01-08 000001   9.73   9.74   9.62   9.66   402388.0  3.892478e+08\n",
      "2019-01-09 000001   9.74  10.08   9.70   9.94  1233486.0  1.229465e+09\n",
      "2019-01-10 000001   9.87  10.20   9.86  10.10  1071817.0  1.079711e+09\n",
      "2019-01-11 000001  10.11  10.22  10.05  10.20   696364.0  7.080018e+08\n",
      "2019-01-14 000001  10.22  10.25  10.07  10.11   500443.0  5.078629e+08\n",
      "2019-01-15 000001  10.11  10.28  10.09  10.24   542160.0  5.530273e+08\n",
      "2019-01-16 000001  10.24  10.50  10.23  10.48   977699.0  1.017495e+09\n",
      "2019-01-17 000001  10.54  10.57  10.17  10.25   882811.0  9.102121e+08\n",
      "2019-01-18 000001  10.34  10.49  10.28  10.43   738793.0  7.699736e+08\n",
      "2019-01-21 000001  10.34  10.47  10.32  10.34   659355.0  6.844657e+08\n",
      "2019-01-22 000001  10.34  10.44  10.26  10.28   424413.0  4.389915e+08\n",
      "2019-01-23 000001  10.29  10.47  10.29  10.35   537876.0  5.593844e+08\n",
      "2019-01-24 000001  10.40  10.55  10.37  10.52   679240.0  7.114957e+08\n",
      "2019-01-25 000001  10.56  11.04  10.55  11.00  2108362.0  2.299718e+09\n",
      "000001\n",
      "---------------under is 账户情况和持仓情况 -------------------\n",
      "{'code': '000001', 'instrument_id': '000001', 'user_id': 'x', 'portfolio_cookie': 'default', 'username': 'quantaxis', 'position_id': 'd2b24d5c-fb1e-4a2e-97eb-f19b04f544ec', 'account_cookie': 'x', 'frozen': {}, 'name': None, 'spms_id': None, 'oms_id': None, 'market_type': 'stock_cn', 'exchange_id': None, 'moneypreset': 100000, 'moneypresetLeft': 100000, 'lastupdatetime': '', 'volume_long_today': 9000, 'volume_long_his': 0, 'volume_long': 9000, 'volume_short_today': 0, 'volume_short_his': 0, 'volume_short': 0, 'volume_long_frozen_today': 0, 'volume_long_frozen_his': 0, 'volume_long_frozen': 0, 'volume_short_frozen_today': 0, 'volume_short_frozen_his': 0, 'volume_short_frozen': 0, 'margin_long': 90120.0, 'margin_short': 0, 'margin': 90120.0, 'position_price_long': 10.013333333333334, 'position_cost_long': 90120.0, 'position_price_short': 0, 'position_cost_short': 0, 'open_price_long': 10.013333333333334, 'open_cost_long': 90120.0, 'open_price_short': 0, 'open_cost_short': 0, 'trades': [], 'orders': {}, 'last_price': 11.0, 'float_profit_long': 8880.0, 'float_profit_short': 0.0, 'float_profit': 8880.0, 'position_profit_long': 8880.0, 'position_profit_short': 0.0, 'position_profit': 8880.0}\n",
      "               datetime    code  price  amount          cash  \\\n",
      "0   2019-01-02 00:00:00  000001   9.19    1000  9.908050e+05   \n",
      "1   2019-01-02 00:00:00  000002  23.90    1000  9.668990e+05   \n",
      "2   2019-01-03 00:00:00  000001   9.28    1000  9.576140e+05   \n",
      "3   2019-01-03 00:00:00  000002  24.07   -1000  9.816539e+05   \n",
      "4   2019-01-04 00:00:00  000001   9.75   -2000  1.001129e+06   \n",
      "5   2019-01-04 00:00:00  000002  24.93    1000  9.761932e+05   \n",
      "6   2019-01-07 00:00:00  000001   9.74    1000  9.664482e+05   \n",
      "7   2019-01-07 00:00:00  000002  25.05   -2000  1.016486e+06   \n",
      "8   2019-01-08 00:00:00  000001   9.66   -3000  1.045429e+06   \n",
      "9   2019-01-08 00:00:00  000002  25.00   -2000  1.095367e+06   \n",
      "10  2019-01-09 00:00:00  000001   9.94    1000  1.085422e+06   \n",
      "11  2019-01-09 00:00:00  000002  25.33    1000  1.060086e+06   \n",
      "12  2019-01-10 00:00:00  000001  10.10    1000  1.049981e+06   \n",
      "13  2019-01-10 00:00:00  000002  25.11    1000  1.024864e+06   \n",
      "14  2019-01-11 00:00:00  000001  10.20    1000  1.014659e+06   \n",
      "15  2019-01-11 00:00:00  000002  25.30   -4000  1.115733e+06   \n",
      "16  2019-01-14 00:00:00  000001  10.11   -6000  1.176317e+06   \n",
      "17  2019-01-14 00:00:00  000002  25.02    1000  1.151291e+06   \n",
      "18  2019-01-15 00:00:00  000001  10.24    1000  1.141046e+06   \n",
      "19  2019-01-15 00:00:00  000002  25.16   -5000  1.266688e+06   \n",
      "20  2019-01-16 00:00:00  000001  10.48   -7000  1.339957e+06   \n",
      "21  2019-01-16 00:00:00  000002  25.42    1000  1.314530e+06   \n",
      "22  2019-01-17 00:00:00  000001  10.25   -7000  1.386191e+06   \n",
      "23  2019-01-17 00:00:00  000002  24.97    1000  1.361214e+06   \n",
      "24  2019-01-18 00:00:00  000001  10.43    1000  1.350779e+06   \n",
      "25  2019-01-18 00:00:00  000002  25.76    1000  1.325013e+06   \n",
      "26  2019-01-21 00:00:00  000001  10.34   -8000  1.407630e+06   \n",
      "27  2019-01-21 00:00:00  000002  25.65   -8000  1.612573e+06   \n",
      "28  2019-01-22 00:00:00  000001  10.28   -8000  1.694710e+06   \n",
      "29  2019-01-22 00:00:00  000002  25.40   -8000  1.897656e+06   \n",
      "30  2019-01-23 00:00:00  000001  10.35   -8000  1.980353e+06   \n",
      "31  2019-01-23 00:00:00  000002  25.31    1000  1.955036e+06   \n",
      "32  2019-01-24 00:00:00  000001  10.52   -8000  2.039091e+06   \n",
      "33  2019-01-24 00:00:00  000002  25.41   -9000  2.267495e+06   \n",
      "34  2019-01-25 00:00:00  000001  11.00    1000  2.256490e+06   \n",
      "\n",
      "                                order_id realorder_id trade_id account_cookie  \\\n",
      "0   e23f9e01-e8d2-4a05-93ef-9163ce7a83ee         None     None              x   \n",
      "1   1f430faa-86d1-440b-abf7-a7feddc17954         None     None              x   \n",
      "2   0230d608-91cc-422e-8deb-218f4faef3d7         None     None              x   \n",
      "3   427f1eed-b3bd-4078-94e3-156bf3ae21a6         None     None              x   \n",
      "4   48fd88b8-e3c0-4df5-94ef-62b936345bd9         None     None              x   \n",
      "5   d9aff179-9bc3-4268-b2d5-37eee8de309f         None     None              x   \n",
      "6   41f23955-b920-4f04-bcb7-ca1cd960aa45         None     None              x   \n",
      "7   cb2fdd74-7326-41d9-812f-9d88da447741         None     None              x   \n",
      "8   8ef82ee7-87b8-4f7d-8a01-374f52b60cbb         None     None              x   \n",
      "9   1f63fa52-f56b-4814-8eb3-5e4de849f3cb         None     None              x   \n",
      "10  13e77d45-9e2c-4ef3-89f5-7fa63cc3b808         None     None              x   \n",
      "11  7e714c35-83a4-4cb4-8ab5-d4fb2b31ccb7         None     None              x   \n",
      "12  380f932e-7871-4c72-94d3-5077861c9f53         None     None              x   \n",
      "13  3966e418-9017-4565-b24f-ed9455ef5593         None     None              x   \n",
      "14  99048106-f032-45a2-92c6-5a076f899a8a         None     None              x   \n",
      "15  3529f52a-3c09-46fc-944d-b3c619af7cd7         None     None              x   \n",
      "16  650c29d4-459c-412a-8000-c881af3c662a         None     None              x   \n",
      "17  9d0b7e50-53ac-42df-9175-c3f303387629         None     None              x   \n",
      "18  80ac049d-602e-44ff-a799-3be84acdfe55         None     None              x   \n",
      "19  e354ff47-4298-4d5a-a22e-794e327dee61         None     None              x   \n",
      "20  4977e6e3-e6ee-4d8c-8c43-9b1f027e07b1         None     None              x   \n",
      "21  16d8792c-b2f0-400d-b2a6-aa5c2e473728         None     None              x   \n",
      "22  eff96ddf-6dbb-4af3-a7bd-1f170e632dbc         None     None              x   \n",
      "23  7b21c653-d1d1-44d8-9772-790585915ae4         None     None              x   \n",
      "24  dfe8fbac-ff27-4746-a53a-f6220f3c63a6         None     None              x   \n",
      "25  98e05d3a-cdf5-4cac-bd41-fa747e29a2a4         None     None              x   \n",
      "26  23cd8f74-342a-4796-aeeb-07441bed75e1         None     None              x   \n",
      "27  3f7dad60-3de4-4ca9-ba5e-af87d33594e6         None     None              x   \n",
      "28  f2b9cae9-b1d9-4a00-ba62-ce81baec3d72         None     None              x   \n",
      "29  de5fce65-5a39-42c6-8d6e-914060c5f971         None     None              x   \n",
      "30  3d763d03-c042-4312-a7e3-ffae8fb877b4         None     None              x   \n",
      "31  d41375b6-70c1-4b71-9eab-0ae5f1763fd2         None     None              x   \n",
      "32  3fc5cbfd-354e-4f68-9248-a0853a763435         None     None              x   \n",
      "33  2b065a3c-e510-4f64-ab30-c94a93a0dc51         None     None              x   \n",
      "34  3c140a72-da07-443f-9386-04440fecb9a4         None     None              x   \n",
      "\n",
      "    commission     tax message  frozen  direction  total_frozen  \n",
      "0       5.0000    0.00    None       0          1             0  \n",
      "1       5.9750    0.00    None       0          1             0  \n",
      "2       5.0000    0.00    None       0          1             0  \n",
      "3       6.0175   24.07    None       0         -1             0  \n",
      "4       5.0000   19.50    None       0         -1             0  \n",
      "5       6.2325    0.00    None       0          1             0  \n",
      "6       5.0000    0.00    None       0          1             0  \n",
      "7      12.5250   50.10    None       0         -1             0  \n",
      "8       7.2450   28.98    None       0         -1             0  \n",
      "9      12.5000   50.00    None       0         -1             0  \n",
      "10      5.0000    0.00    None       0          1             0  \n",
      "11      6.3325    0.00    None       0          1             0  \n",
      "12      5.0000    0.00    None       0          1             0  \n",
      "13      6.2775    0.00    None       0          1             0  \n",
      "14      5.0000    0.00    None       0          1             0  \n",
      "15     25.3000  101.20    None       0         -1             0  \n",
      "16     15.1650   60.66    None       0         -1             0  \n",
      "17      6.2550    0.00    None       0          1             0  \n",
      "18      5.0000    0.00    None       0          1             0  \n",
      "19     31.4500  125.80    None       0         -1             0  \n",
      "20     18.3400   73.36    None       0         -1             0  \n",
      "21      6.3550    0.00    None       0          1             0  \n",
      "22     17.9375   71.75    None       0         -1             0  \n",
      "23      6.2425    0.00    None       0          1             0  \n",
      "24      5.0000    0.00    None       0          1             0  \n",
      "25      6.4400    0.00    None       0          1             0  \n",
      "26     20.6800   82.72    None       0         -1             0  \n",
      "27     51.3000  205.20    None       0         -1             0  \n",
      "28     20.5600   82.24    None       0         -1             0  \n",
      "29     50.8000  203.20    None       0         -1             0  \n",
      "30     20.7000   82.80    None       0         -1             0  \n",
      "31      6.3275    0.00    None       0          1             0  \n",
      "32     21.0400   84.16    None       0         -1             0  \n",
      "33     57.1725  228.69    None       0         -1             0  \n",
      "34      5.0000    0.00    None       0          1             0  \n"
     ]
    },
    {
     "name": "stdin",
     "output_type": "stream",
     "text": [
      " \n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "open      2.551000e+01\n",
      "high      2.635000e+01\n",
      "low       2.549000e+01\n",
      "close     2.610000e+01\n",
      "volume    4.517560e+05\n",
      "amount    1.176480e+09\n",
      "Name: (2019-01-25 00:00:00, 000002), dtype: float64\n",
      "---------------under is 当前全市场的market_data --------------\n",
      "                    open   high    low  close     volume        amount\n",
      "2019-01-25 000001  10.56  11.04  10.55   11.0  2108362.0  2.299718e+09\n",
      "           000002  25.51  26.35  25.49   26.1   451756.0  1.176480e+09\n",
      "---------------under is 当前品种的market_data --------------\n",
      "                    open   high    low  close    volume        amount\n",
      "2019-01-02 000002  23.83  24.09  23.67  23.90  247010.0  5.893846e+08\n",
      "2019-01-03 000002  23.79  24.50  23.71  24.07  222353.0  5.363333e+08\n",
      "2019-01-04 000002  23.91  25.00  23.85  24.93  377727.0  9.270117e+08\n",
      "2019-01-07 000002  25.29  25.53  24.99  25.05  427154.0  1.077909e+09\n",
      "2019-01-08 000002  25.05  25.20  24.63  25.00  214382.0  5.336044e+08\n",
      "2019-01-09 000002  25.40  25.88  25.11  25.33  340140.0  8.670814e+08\n",
      "2019-01-10 000002  25.22  25.56  25.03  25.11  224649.0  5.689526e+08\n",
      "2019-01-11 000002  25.10  25.54  25.01  25.30  240694.0  6.069947e+08\n",
      "2019-01-14 000002  25.13  25.30  24.92  25.02  183281.0  4.591518e+08\n",
      "2019-01-15 000002  25.00  25.16  24.32  25.16  368758.0  9.149835e+08\n",
      "2019-01-16 000002  25.15  25.50  24.83  25.42  267466.0  6.766856e+08\n",
      "2019-01-17 000002  25.50  25.50  24.94  24.97  245895.0  6.188767e+08\n",
      "2019-01-18 000002  25.00  25.76  24.99  25.76  365723.0  9.334642e+08\n",
      "2019-01-21 000002  25.71  25.95  25.40  25.65  255499.0  6.558207e+08\n",
      "2019-01-22 000002  25.50  26.17  25.23  25.40  379336.0  9.748227e+08\n",
      "2019-01-23 000002  25.35  25.49  25.20  25.31  146847.0  3.718901e+08\n",
      "2019-01-24 000002  25.42  25.54  24.93  25.41  234931.0  5.928229e+08\n",
      "2019-01-25 000002  25.51  26.35  25.49  26.10  451756.0  1.176480e+09\n",
      "000002\n",
      "---------------under is 账户情况和持仓情况 -------------------\n",
      "{'code': '000002', 'instrument_id': '000002', 'user_id': 'x', 'portfolio_cookie': 'default', 'username': 'quantaxis', 'position_id': '5aa694d0-3861-43a8-9efc-84f380138bea', 'account_cookie': 'x', 'frozen': {}, 'name': None, 'spms_id': None, 'oms_id': None, 'market_type': 'stock_cn', 'exchange_id': None, 'moneypreset': 100000, 'moneypresetLeft': 100000, 'lastupdatetime': '', 'volume_long_today': 10000, 'volume_long_his': 0, 'volume_long': 10000, 'volume_short_today': 0, 'volume_short_his': 0, 'volume_short': 0, 'volume_long_frozen_today': 0, 'volume_long_frozen_his': 0, 'volume_long_frozen': 0, 'volume_short_frozen_today': 0, 'volume_short_frozen_his': 0, 'volume_short_frozen': 0, 'margin_long': 251850.0, 'margin_short': 0, 'margin': 251850.0, 'position_price_long': 25.185, 'position_cost_long': 251850.0, 'position_price_short': 0, 'position_cost_short': 0, 'open_price_long': 25.185, 'open_cost_long': 251850.0, 'open_price_short': 0, 'open_cost_short': 0, 'trades': [], 'orders': {}, 'last_price': 26.1, 'float_profit_long': 9150.0, 'float_profit_short': 0.0, 'float_profit': 9150.0, 'position_profit_long': 9150.0, 'position_profit_short': 0.0, 'position_profit': 9150.0}\n",
      "               datetime    code  price  amount          cash  \\\n",
      "0   2019-01-02 00:00:00  000001   9.19    1000  9.908050e+05   \n",
      "1   2019-01-02 00:00:00  000002  23.90    1000  9.668990e+05   \n",
      "2   2019-01-03 00:00:00  000001   9.28    1000  9.576140e+05   \n",
      "3   2019-01-03 00:00:00  000002  24.07   -1000  9.816539e+05   \n",
      "4   2019-01-04 00:00:00  000001   9.75   -2000  1.001129e+06   \n",
      "5   2019-01-04 00:00:00  000002  24.93    1000  9.761932e+05   \n",
      "6   2019-01-07 00:00:00  000001   9.74    1000  9.664482e+05   \n",
      "7   2019-01-07 00:00:00  000002  25.05   -2000  1.016486e+06   \n",
      "8   2019-01-08 00:00:00  000001   9.66   -3000  1.045429e+06   \n",
      "9   2019-01-08 00:00:00  000002  25.00   -2000  1.095367e+06   \n",
      "10  2019-01-09 00:00:00  000001   9.94    1000  1.085422e+06   \n",
      "11  2019-01-09 00:00:00  000002  25.33    1000  1.060086e+06   \n",
      "12  2019-01-10 00:00:00  000001  10.10    1000  1.049981e+06   \n",
      "13  2019-01-10 00:00:00  000002  25.11    1000  1.024864e+06   \n",
      "14  2019-01-11 00:00:00  000001  10.20    1000  1.014659e+06   \n",
      "15  2019-01-11 00:00:00  000002  25.30   -4000  1.115733e+06   \n",
      "16  2019-01-14 00:00:00  000001  10.11   -6000  1.176317e+06   \n",
      "17  2019-01-14 00:00:00  000002  25.02    1000  1.151291e+06   \n",
      "18  2019-01-15 00:00:00  000001  10.24    1000  1.141046e+06   \n",
      "19  2019-01-15 00:00:00  000002  25.16   -5000  1.266688e+06   \n",
      "20  2019-01-16 00:00:00  000001  10.48   -7000  1.339957e+06   \n",
      "21  2019-01-16 00:00:00  000002  25.42    1000  1.314530e+06   \n",
      "22  2019-01-17 00:00:00  000001  10.25   -7000  1.386191e+06   \n",
      "23  2019-01-17 00:00:00  000002  24.97    1000  1.361214e+06   \n",
      "24  2019-01-18 00:00:00  000001  10.43    1000  1.350779e+06   \n",
      "25  2019-01-18 00:00:00  000002  25.76    1000  1.325013e+06   \n",
      "26  2019-01-21 00:00:00  000001  10.34   -8000  1.407630e+06   \n",
      "27  2019-01-21 00:00:00  000002  25.65   -8000  1.612573e+06   \n",
      "28  2019-01-22 00:00:00  000001  10.28   -8000  1.694710e+06   \n",
      "29  2019-01-22 00:00:00  000002  25.40   -8000  1.897656e+06   \n",
      "30  2019-01-23 00:00:00  000001  10.35   -8000  1.980353e+06   \n",
      "31  2019-01-23 00:00:00  000002  25.31    1000  1.955036e+06   \n",
      "32  2019-01-24 00:00:00  000001  10.52   -8000  2.039091e+06   \n",
      "33  2019-01-24 00:00:00  000002  25.41   -9000  2.267495e+06   \n",
      "34  2019-01-25 00:00:00  000001  11.00    1000  2.256490e+06   \n",
      "35  2019-01-25 00:00:00  000002  26.10    1000  2.230384e+06   \n",
      "\n",
      "                                order_id realorder_id trade_id account_cookie  \\\n",
      "0   e23f9e01-e8d2-4a05-93ef-9163ce7a83ee         None     None              x   \n",
      "1   1f430faa-86d1-440b-abf7-a7feddc17954         None     None              x   \n",
      "2   0230d608-91cc-422e-8deb-218f4faef3d7         None     None              x   \n",
      "3   427f1eed-b3bd-4078-94e3-156bf3ae21a6         None     None              x   \n",
      "4   48fd88b8-e3c0-4df5-94ef-62b936345bd9         None     None              x   \n",
      "5   d9aff179-9bc3-4268-b2d5-37eee8de309f         None     None              x   \n",
      "6   41f23955-b920-4f04-bcb7-ca1cd960aa45         None     None              x   \n",
      "7   cb2fdd74-7326-41d9-812f-9d88da447741         None     None              x   \n",
      "8   8ef82ee7-87b8-4f7d-8a01-374f52b60cbb         None     None              x   \n",
      "9   1f63fa52-f56b-4814-8eb3-5e4de849f3cb         None     None              x   \n",
      "10  13e77d45-9e2c-4ef3-89f5-7fa63cc3b808         None     None              x   \n",
      "11  7e714c35-83a4-4cb4-8ab5-d4fb2b31ccb7         None     None              x   \n",
      "12  380f932e-7871-4c72-94d3-5077861c9f53         None     None              x   \n",
      "13  3966e418-9017-4565-b24f-ed9455ef5593         None     None              x   \n",
      "14  99048106-f032-45a2-92c6-5a076f899a8a         None     None              x   \n",
      "15  3529f52a-3c09-46fc-944d-b3c619af7cd7         None     None              x   \n",
      "16  650c29d4-459c-412a-8000-c881af3c662a         None     None              x   \n",
      "17  9d0b7e50-53ac-42df-9175-c3f303387629         None     None              x   \n",
      "18  80ac049d-602e-44ff-a799-3be84acdfe55         None     None              x   \n",
      "19  e354ff47-4298-4d5a-a22e-794e327dee61         None     None              x   \n",
      "20  4977e6e3-e6ee-4d8c-8c43-9b1f027e07b1         None     None              x   \n",
      "21  16d8792c-b2f0-400d-b2a6-aa5c2e473728         None     None              x   \n",
      "22  eff96ddf-6dbb-4af3-a7bd-1f170e632dbc         None     None              x   \n",
      "23  7b21c653-d1d1-44d8-9772-790585915ae4         None     None              x   \n",
      "24  dfe8fbac-ff27-4746-a53a-f6220f3c63a6         None     None              x   \n",
      "25  98e05d3a-cdf5-4cac-bd41-fa747e29a2a4         None     None              x   \n",
      "26  23cd8f74-342a-4796-aeeb-07441bed75e1         None     None              x   \n",
      "27  3f7dad60-3de4-4ca9-ba5e-af87d33594e6         None     None              x   \n",
      "28  f2b9cae9-b1d9-4a00-ba62-ce81baec3d72         None     None              x   \n",
      "29  de5fce65-5a39-42c6-8d6e-914060c5f971         None     None              x   \n",
      "30  3d763d03-c042-4312-a7e3-ffae8fb877b4         None     None              x   \n",
      "31  d41375b6-70c1-4b71-9eab-0ae5f1763fd2         None     None              x   \n",
      "32  3fc5cbfd-354e-4f68-9248-a0853a763435         None     None              x   \n",
      "33  2b065a3c-e510-4f64-ab30-c94a93a0dc51         None     None              x   \n",
      "34  3c140a72-da07-443f-9386-04440fecb9a4         None     None              x   \n",
      "35  0002bf5f-e6ec-433b-b8bd-841e76c93483         None     None              x   \n",
      "\n",
      "    commission     tax message  frozen  direction  total_frozen  \n",
      "0       5.0000    0.00    None       0          1             0  \n",
      "1       5.9750    0.00    None       0          1             0  \n",
      "2       5.0000    0.00    None       0          1             0  \n",
      "3       6.0175   24.07    None       0         -1             0  \n",
      "4       5.0000   19.50    None       0         -1             0  \n",
      "5       6.2325    0.00    None       0          1             0  \n",
      "6       5.0000    0.00    None       0          1             0  \n",
      "7      12.5250   50.10    None       0         -1             0  \n",
      "8       7.2450   28.98    None       0         -1             0  \n",
      "9      12.5000   50.00    None       0         -1             0  \n",
      "10      5.0000    0.00    None       0          1             0  \n",
      "11      6.3325    0.00    None       0          1             0  \n",
      "12      5.0000    0.00    None       0          1             0  \n",
      "13      6.2775    0.00    None       0          1             0  \n",
      "14      5.0000    0.00    None       0          1             0  \n",
      "15     25.3000  101.20    None       0         -1             0  \n",
      "16     15.1650   60.66    None       0         -1             0  \n",
      "17      6.2550    0.00    None       0          1             0  \n",
      "18      5.0000    0.00    None       0          1             0  \n",
      "19     31.4500  125.80    None       0         -1             0  \n",
      "20     18.3400   73.36    None       0         -1             0  \n",
      "21      6.3550    0.00    None       0          1             0  \n",
      "22     17.9375   71.75    None       0         -1             0  \n",
      "23      6.2425    0.00    None       0          1             0  \n",
      "24      5.0000    0.00    None       0          1             0  \n",
      "25      6.4400    0.00    None       0          1             0  \n",
      "26     20.6800   82.72    None       0         -1             0  \n",
      "27     51.3000  205.20    None       0         -1             0  \n",
      "28     20.5600   82.24    None       0         -1             0  \n",
      "29     50.8000  203.20    None       0         -1             0  \n",
      "30     20.7000   82.80    None       0         -1             0  \n",
      "31      6.3275    0.00    None       0          1             0  \n",
      "32     21.0400   84.16    None       0         -1             0  \n",
      "33     57.1725  228.69    None       0         -1             0  \n",
      "34      5.0000    0.00    None       0          1             0  \n",
      "35      6.5250    0.00    None       0          1             0  \n"
     ]
    },
    {
     "name": "stdin",
     "output_type": "stream",
     "text": [
      " \n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "backtest: Settle!\n",
      "open      1.104000e+01\n",
      "high      1.114000e+01\n",
      "low       1.088000e+01\n",
      "close     1.094000e+01\n",
      "volume    1.035909e+06\n",
      "amount    1.141854e+09\n",
      "Name: (2019-01-28 00:00:00, 000001), dtype: float64\n",
      "---------------under is 当前全市场的market_data --------------\n",
      "                    open   high    low  close     volume        amount\n",
      "2019-01-28 000001  11.04  11.14  10.88  10.94  1035909.0  1.141854e+09\n",
      "---------------under is 当前品种的market_data --------------\n",
      "                    open   high    low  close     volume        amount\n",
      "2019-01-02 000001   9.39   9.42   9.16   9.19   539386.0  4.986951e+08\n",
      "2019-01-03 000001   9.18   9.33   9.15   9.28   415537.0  3.844577e+08\n",
      "2019-01-04 000001   9.24   9.82   9.22   9.75  1481159.0  1.422150e+09\n",
      "2019-01-07 000001   9.84   9.85   9.63   9.74   865687.0  8.411664e+08\n",
      "2019-01-08 000001   9.73   9.74   9.62   9.66   402388.0  3.892478e+08\n",
      "2019-01-09 000001   9.74  10.08   9.70   9.94  1233486.0  1.229465e+09\n",
      "2019-01-10 000001   9.87  10.20   9.86  10.10  1071817.0  1.079711e+09\n",
      "2019-01-11 000001  10.11  10.22  10.05  10.20   696364.0  7.080018e+08\n",
      "2019-01-14 000001  10.22  10.25  10.07  10.11   500443.0  5.078629e+08\n",
      "2019-01-15 000001  10.11  10.28  10.09  10.24   542160.0  5.530273e+08\n",
      "2019-01-16 000001  10.24  10.50  10.23  10.48   977699.0  1.017495e+09\n",
      "2019-01-17 000001  10.54  10.57  10.17  10.25   882811.0  9.102121e+08\n",
      "2019-01-18 000001  10.34  10.49  10.28  10.43   738793.0  7.699736e+08\n",
      "2019-01-21 000001  10.34  10.47  10.32  10.34   659355.0  6.844657e+08\n",
      "2019-01-22 000001  10.34  10.44  10.26  10.28   424413.0  4.389915e+08\n",
      "2019-01-23 000001  10.29  10.47  10.29  10.35   537876.0  5.593844e+08\n",
      "2019-01-24 000001  10.40  10.55  10.37  10.52   679240.0  7.114957e+08\n",
      "2019-01-25 000001  10.56  11.04  10.55  11.00  2108362.0  2.299718e+09\n",
      "2019-01-28 000001  11.04  11.14  10.88  10.94  1035909.0  1.141854e+09\n",
      "000001\n",
      "---------------under is 账户情况和持仓情况 -------------------\n",
      "{'code': '000001', 'instrument_id': '000001', 'user_id': 'x', 'portfolio_cookie': 'default', 'username': 'quantaxis', 'position_id': 'd2b24d5c-fb1e-4a2e-97eb-f19b04f544ec', 'account_cookie': 'x', 'frozen': {}, 'name': None, 'spms_id': None, 'oms_id': None, 'market_type': 'stock_cn', 'exchange_id': None, 'moneypreset': 100000, 'moneypresetLeft': 100000, 'lastupdatetime': '', 'volume_long_today': 9000, 'volume_long_his': 0, 'volume_long': 9000, 'volume_short_today': 0, 'volume_short_his': 0, 'volume_short': 0, 'volume_long_frozen_today': 0, 'volume_long_frozen_his': 0, 'volume_long_frozen': 0, 'volume_short_frozen_today': 0, 'volume_short_frozen_his': 0, 'volume_short_frozen': 0, 'margin_long': 90120.0, 'margin_short': 0, 'margin': 90120.0, 'position_price_long': 10.013333333333334, 'position_cost_long': 90120.0, 'position_price_short': 0, 'position_cost_short': 0, 'open_price_long': 10.013333333333334, 'open_cost_long': 90120.0, 'open_price_short': 0, 'open_cost_short': 0, 'trades': [], 'orders': {}, 'last_price': 10.94, 'float_profit_long': 8340.0, 'float_profit_short': 0.0, 'float_profit': 8340.0, 'position_profit_long': 8340.0, 'position_profit_short': 0.0, 'position_profit': 8340.0}\n",
      "               datetime    code  price  amount          cash  \\\n",
      "0   2019-01-02 00:00:00  000001   9.19    1000  9.908050e+05   \n",
      "1   2019-01-02 00:00:00  000002  23.90    1000  9.668990e+05   \n",
      "2   2019-01-03 00:00:00  000001   9.28    1000  9.576140e+05   \n",
      "3   2019-01-03 00:00:00  000002  24.07   -1000  9.816539e+05   \n",
      "4   2019-01-04 00:00:00  000001   9.75   -2000  1.001129e+06   \n",
      "5   2019-01-04 00:00:00  000002  24.93    1000  9.761932e+05   \n",
      "6   2019-01-07 00:00:00  000001   9.74    1000  9.664482e+05   \n",
      "7   2019-01-07 00:00:00  000002  25.05   -2000  1.016486e+06   \n",
      "8   2019-01-08 00:00:00  000001   9.66   -3000  1.045429e+06   \n",
      "9   2019-01-08 00:00:00  000002  25.00   -2000  1.095367e+06   \n",
      "10  2019-01-09 00:00:00  000001   9.94    1000  1.085422e+06   \n",
      "11  2019-01-09 00:00:00  000002  25.33    1000  1.060086e+06   \n",
      "12  2019-01-10 00:00:00  000001  10.10    1000  1.049981e+06   \n",
      "13  2019-01-10 00:00:00  000002  25.11    1000  1.024864e+06   \n",
      "14  2019-01-11 00:00:00  000001  10.20    1000  1.014659e+06   \n",
      "15  2019-01-11 00:00:00  000002  25.30   -4000  1.115733e+06   \n",
      "16  2019-01-14 00:00:00  000001  10.11   -6000  1.176317e+06   \n",
      "17  2019-01-14 00:00:00  000002  25.02    1000  1.151291e+06   \n",
      "18  2019-01-15 00:00:00  000001  10.24    1000  1.141046e+06   \n",
      "19  2019-01-15 00:00:00  000002  25.16   -5000  1.266688e+06   \n",
      "20  2019-01-16 00:00:00  000001  10.48   -7000  1.339957e+06   \n",
      "21  2019-01-16 00:00:00  000002  25.42    1000  1.314530e+06   \n",
      "22  2019-01-17 00:00:00  000001  10.25   -7000  1.386191e+06   \n",
      "23  2019-01-17 00:00:00  000002  24.97    1000  1.361214e+06   \n",
      "24  2019-01-18 00:00:00  000001  10.43    1000  1.350779e+06   \n",
      "25  2019-01-18 00:00:00  000002  25.76    1000  1.325013e+06   \n",
      "26  2019-01-21 00:00:00  000001  10.34   -8000  1.407630e+06   \n",
      "27  2019-01-21 00:00:00  000002  25.65   -8000  1.612573e+06   \n",
      "28  2019-01-22 00:00:00  000001  10.28   -8000  1.694710e+06   \n",
      "29  2019-01-22 00:00:00  000002  25.40   -8000  1.897656e+06   \n",
      "30  2019-01-23 00:00:00  000001  10.35   -8000  1.980353e+06   \n",
      "31  2019-01-23 00:00:00  000002  25.31    1000  1.955036e+06   \n",
      "32  2019-01-24 00:00:00  000001  10.52   -8000  2.039091e+06   \n",
      "33  2019-01-24 00:00:00  000002  25.41   -9000  2.267495e+06   \n",
      "34  2019-01-25 00:00:00  000001  11.00    1000  2.256490e+06   \n",
      "35  2019-01-25 00:00:00  000002  26.10    1000  2.230384e+06   \n",
      "36  2019-01-28 00:00:00  000001  10.94   -9000  2.328721e+06   \n",
      "\n",
      "                                order_id realorder_id trade_id account_cookie  \\\n",
      "0   e23f9e01-e8d2-4a05-93ef-9163ce7a83ee         None     None              x   \n",
      "1   1f430faa-86d1-440b-abf7-a7feddc17954         None     None              x   \n",
      "2   0230d608-91cc-422e-8deb-218f4faef3d7         None     None              x   \n",
      "3   427f1eed-b3bd-4078-94e3-156bf3ae21a6         None     None              x   \n",
      "4   48fd88b8-e3c0-4df5-94ef-62b936345bd9         None     None              x   \n",
      "5   d9aff179-9bc3-4268-b2d5-37eee8de309f         None     None              x   \n",
      "6   41f23955-b920-4f04-bcb7-ca1cd960aa45         None     None              x   \n",
      "7   cb2fdd74-7326-41d9-812f-9d88da447741         None     None              x   \n",
      "8   8ef82ee7-87b8-4f7d-8a01-374f52b60cbb         None     None              x   \n",
      "9   1f63fa52-f56b-4814-8eb3-5e4de849f3cb         None     None              x   \n",
      "10  13e77d45-9e2c-4ef3-89f5-7fa63cc3b808         None     None              x   \n",
      "11  7e714c35-83a4-4cb4-8ab5-d4fb2b31ccb7         None     None              x   \n",
      "12  380f932e-7871-4c72-94d3-5077861c9f53         None     None              x   \n",
      "13  3966e418-9017-4565-b24f-ed9455ef5593         None     None              x   \n",
      "14  99048106-f032-45a2-92c6-5a076f899a8a         None     None              x   \n",
      "15  3529f52a-3c09-46fc-944d-b3c619af7cd7         None     None              x   \n",
      "16  650c29d4-459c-412a-8000-c881af3c662a         None     None              x   \n",
      "17  9d0b7e50-53ac-42df-9175-c3f303387629         None     None              x   \n",
      "18  80ac049d-602e-44ff-a799-3be84acdfe55         None     None              x   \n",
      "19  e354ff47-4298-4d5a-a22e-794e327dee61         None     None              x   \n",
      "20  4977e6e3-e6ee-4d8c-8c43-9b1f027e07b1         None     None              x   \n",
      "21  16d8792c-b2f0-400d-b2a6-aa5c2e473728         None     None              x   \n",
      "22  eff96ddf-6dbb-4af3-a7bd-1f170e632dbc         None     None              x   \n",
      "23  7b21c653-d1d1-44d8-9772-790585915ae4         None     None              x   \n",
      "24  dfe8fbac-ff27-4746-a53a-f6220f3c63a6         None     None              x   \n",
      "25  98e05d3a-cdf5-4cac-bd41-fa747e29a2a4         None     None              x   \n",
      "26  23cd8f74-342a-4796-aeeb-07441bed75e1         None     None              x   \n",
      "27  3f7dad60-3de4-4ca9-ba5e-af87d33594e6         None     None              x   \n",
      "28  f2b9cae9-b1d9-4a00-ba62-ce81baec3d72         None     None              x   \n",
      "29  de5fce65-5a39-42c6-8d6e-914060c5f971         None     None              x   \n",
      "30  3d763d03-c042-4312-a7e3-ffae8fb877b4         None     None              x   \n",
      "31  d41375b6-70c1-4b71-9eab-0ae5f1763fd2         None     None              x   \n",
      "32  3fc5cbfd-354e-4f68-9248-a0853a763435         None     None              x   \n",
      "33  2b065a3c-e510-4f64-ab30-c94a93a0dc51         None     None              x   \n",
      "34  3c140a72-da07-443f-9386-04440fecb9a4         None     None              x   \n",
      "35  0002bf5f-e6ec-433b-b8bd-841e76c93483         None     None              x   \n",
      "36  306a25f0-fc21-4eee-b0bb-9d5a0a57694d         None     None              x   \n",
      "\n",
      "    commission     tax message  frozen  direction  total_frozen  \n",
      "0       5.0000    0.00    None       0          1             0  \n",
      "1       5.9750    0.00    None       0          1             0  \n",
      "2       5.0000    0.00    None       0          1             0  \n",
      "3       6.0175   24.07    None       0         -1             0  \n",
      "4       5.0000   19.50    None       0         -1             0  \n",
      "5       6.2325    0.00    None       0          1             0  \n",
      "6       5.0000    0.00    None       0          1             0  \n",
      "7      12.5250   50.10    None       0         -1             0  \n",
      "8       7.2450   28.98    None       0         -1             0  \n",
      "9      12.5000   50.00    None       0         -1             0  \n",
      "10      5.0000    0.00    None       0          1             0  \n",
      "11      6.3325    0.00    None       0          1             0  \n",
      "12      5.0000    0.00    None       0          1             0  \n",
      "13      6.2775    0.00    None       0          1             0  \n",
      "14      5.0000    0.00    None       0          1             0  \n",
      "15     25.3000  101.20    None       0         -1             0  \n",
      "16     15.1650   60.66    None       0         -1             0  \n",
      "17      6.2550    0.00    None       0          1             0  \n",
      "18      5.0000    0.00    None       0          1             0  \n",
      "19     31.4500  125.80    None       0         -1             0  \n",
      "20     18.3400   73.36    None       0         -1             0  \n",
      "21      6.3550    0.00    None       0          1             0  \n",
      "22     17.9375   71.75    None       0         -1             0  \n",
      "23      6.2425    0.00    None       0          1             0  \n",
      "24      5.0000    0.00    None       0          1             0  \n",
      "25      6.4400    0.00    None       0          1             0  \n",
      "26     20.6800   82.72    None       0         -1             0  \n",
      "27     51.3000  205.20    None       0         -1             0  \n",
      "28     20.5600   82.24    None       0         -1             0  \n",
      "29     50.8000  203.20    None       0         -1             0  \n",
      "30     20.7000   82.80    None       0         -1             0  \n",
      "31      6.3275    0.00    None       0          1             0  \n",
      "32     21.0400   84.16    None       0         -1             0  \n",
      "33     57.1725  228.69    None       0         -1             0  \n",
      "34      5.0000    0.00    None       0          1             0  \n",
      "35      6.5250    0.00    None       0          1             0  \n",
      "36     24.6150   98.46    None       0         -1             0  \n"
     ]
    },
    {
     "name": "stdin",
     "output_type": "stream",
     "text": [
      " \n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "open      2.620000e+01\n",
      "high      2.662000e+01\n",
      "low       2.586000e+01\n",
      "close     2.606000e+01\n",
      "volume    3.089060e+05\n",
      "amount    8.102888e+08\n",
      "Name: (2019-01-28 00:00:00, 000002), dtype: float64\n",
      "---------------under is 当前全市场的market_data --------------\n",
      "                    open   high    low  close     volume        amount\n",
      "2019-01-28 000001  11.04  11.14  10.88  10.94  1035909.0  1.141854e+09\n",
      "           000002  26.20  26.62  25.86  26.06   308906.0  8.102888e+08\n",
      "---------------under is 当前品种的market_data --------------\n",
      "                    open   high    low  close    volume        amount\n",
      "2019-01-02 000002  23.83  24.09  23.67  23.90  247010.0  5.893846e+08\n",
      "2019-01-03 000002  23.79  24.50  23.71  24.07  222353.0  5.363333e+08\n",
      "2019-01-04 000002  23.91  25.00  23.85  24.93  377727.0  9.270117e+08\n",
      "2019-01-07 000002  25.29  25.53  24.99  25.05  427154.0  1.077909e+09\n",
      "2019-01-08 000002  25.05  25.20  24.63  25.00  214382.0  5.336044e+08\n",
      "2019-01-09 000002  25.40  25.88  25.11  25.33  340140.0  8.670814e+08\n",
      "2019-01-10 000002  25.22  25.56  25.03  25.11  224649.0  5.689526e+08\n",
      "2019-01-11 000002  25.10  25.54  25.01  25.30  240694.0  6.069947e+08\n",
      "2019-01-14 000002  25.13  25.30  24.92  25.02  183281.0  4.591518e+08\n",
      "2019-01-15 000002  25.00  25.16  24.32  25.16  368758.0  9.149835e+08\n",
      "2019-01-16 000002  25.15  25.50  24.83  25.42  267466.0  6.766856e+08\n",
      "2019-01-17 000002  25.50  25.50  24.94  24.97  245895.0  6.188767e+08\n",
      "2019-01-18 000002  25.00  25.76  24.99  25.76  365723.0  9.334642e+08\n",
      "2019-01-21 000002  25.71  25.95  25.40  25.65  255499.0  6.558207e+08\n",
      "2019-01-22 000002  25.50  26.17  25.23  25.40  379336.0  9.748227e+08\n",
      "2019-01-23 000002  25.35  25.49  25.20  25.31  146847.0  3.718901e+08\n",
      "2019-01-24 000002  25.42  25.54  24.93  25.41  234931.0  5.928229e+08\n",
      "2019-01-25 000002  25.51  26.35  25.49  26.10  451756.0  1.176480e+09\n",
      "2019-01-28 000002  26.20  26.62  25.86  26.06  308906.0  8.102888e+08\n",
      "000002\n",
      "---------------under is 账户情况和持仓情况 -------------------\n",
      "{'code': '000002', 'instrument_id': '000002', 'user_id': 'x', 'portfolio_cookie': 'default', 'username': 'quantaxis', 'position_id': '5aa694d0-3861-43a8-9efc-84f380138bea', 'account_cookie': 'x', 'frozen': {}, 'name': None, 'spms_id': None, 'oms_id': None, 'market_type': 'stock_cn', 'exchange_id': None, 'moneypreset': 100000, 'moneypresetLeft': 100000, 'lastupdatetime': '', 'volume_long_today': 11000, 'volume_long_his': 0, 'volume_long': 11000, 'volume_short_today': 0, 'volume_short_his': 0, 'volume_short': 0, 'volume_long_frozen_today': 0, 'volume_long_frozen_his': 0, 'volume_long_frozen': 0, 'volume_short_frozen_today': 0, 'volume_short_frozen_his': 0, 'volume_short_frozen': 0, 'margin_long': 277910.0, 'margin_short': 0, 'margin': 277910.0, 'position_price_long': 25.264545454545456, 'position_cost_long': 277910.0, 'position_price_short': 0, 'position_cost_short': 0, 'open_price_long': 25.264545454545456, 'open_cost_long': 277910.0, 'open_price_short': 0, 'open_cost_short': 0, 'trades': [], 'orders': {}, 'last_price': 26.06, 'float_profit_long': 8750.0, 'float_profit_short': 0.0, 'float_profit': 8750.0, 'position_profit_long': 8750.0, 'position_profit_short': 0.0, 'position_profit': 8750.0}\n",
      "               datetime    code  price  amount          cash  \\\n",
      "0   2019-01-02 00:00:00  000001   9.19    1000  9.908050e+05   \n",
      "1   2019-01-02 00:00:00  000002  23.90    1000  9.668990e+05   \n",
      "2   2019-01-03 00:00:00  000001   9.28    1000  9.576140e+05   \n",
      "3   2019-01-03 00:00:00  000002  24.07   -1000  9.816539e+05   \n",
      "4   2019-01-04 00:00:00  000001   9.75   -2000  1.001129e+06   \n",
      "5   2019-01-04 00:00:00  000002  24.93    1000  9.761932e+05   \n",
      "6   2019-01-07 00:00:00  000001   9.74    1000  9.664482e+05   \n",
      "7   2019-01-07 00:00:00  000002  25.05   -2000  1.016486e+06   \n",
      "8   2019-01-08 00:00:00  000001   9.66   -3000  1.045429e+06   \n",
      "9   2019-01-08 00:00:00  000002  25.00   -2000  1.095367e+06   \n",
      "10  2019-01-09 00:00:00  000001   9.94    1000  1.085422e+06   \n",
      "11  2019-01-09 00:00:00  000002  25.33    1000  1.060086e+06   \n",
      "12  2019-01-10 00:00:00  000001  10.10    1000  1.049981e+06   \n",
      "13  2019-01-10 00:00:00  000002  25.11    1000  1.024864e+06   \n",
      "14  2019-01-11 00:00:00  000001  10.20    1000  1.014659e+06   \n",
      "15  2019-01-11 00:00:00  000002  25.30   -4000  1.115733e+06   \n",
      "16  2019-01-14 00:00:00  000001  10.11   -6000  1.176317e+06   \n",
      "17  2019-01-14 00:00:00  000002  25.02    1000  1.151291e+06   \n",
      "18  2019-01-15 00:00:00  000001  10.24    1000  1.141046e+06   \n",
      "19  2019-01-15 00:00:00  000002  25.16   -5000  1.266688e+06   \n",
      "20  2019-01-16 00:00:00  000001  10.48   -7000  1.339957e+06   \n",
      "21  2019-01-16 00:00:00  000002  25.42    1000  1.314530e+06   \n",
      "22  2019-01-17 00:00:00  000001  10.25   -7000  1.386191e+06   \n",
      "23  2019-01-17 00:00:00  000002  24.97    1000  1.361214e+06   \n",
      "24  2019-01-18 00:00:00  000001  10.43    1000  1.350779e+06   \n",
      "25  2019-01-18 00:00:00  000002  25.76    1000  1.325013e+06   \n",
      "26  2019-01-21 00:00:00  000001  10.34   -8000  1.407630e+06   \n",
      "27  2019-01-21 00:00:00  000002  25.65   -8000  1.612573e+06   \n",
      "28  2019-01-22 00:00:00  000001  10.28   -8000  1.694710e+06   \n",
      "29  2019-01-22 00:00:00  000002  25.40   -8000  1.897656e+06   \n",
      "30  2019-01-23 00:00:00  000001  10.35   -8000  1.980353e+06   \n",
      "31  2019-01-23 00:00:00  000002  25.31    1000  1.955036e+06   \n",
      "32  2019-01-24 00:00:00  000001  10.52   -8000  2.039091e+06   \n",
      "33  2019-01-24 00:00:00  000002  25.41   -9000  2.267495e+06   \n",
      "34  2019-01-25 00:00:00  000001  11.00    1000  2.256490e+06   \n",
      "35  2019-01-25 00:00:00  000002  26.10    1000  2.230384e+06   \n",
      "36  2019-01-28 00:00:00  000001  10.94   -9000  2.328721e+06   \n",
      "37  2019-01-28 00:00:00  000002  26.06    1000  2.302654e+06   \n",
      "\n",
      "                                order_id realorder_id trade_id account_cookie  \\\n",
      "0   e23f9e01-e8d2-4a05-93ef-9163ce7a83ee         None     None              x   \n",
      "1   1f430faa-86d1-440b-abf7-a7feddc17954         None     None              x   \n",
      "2   0230d608-91cc-422e-8deb-218f4faef3d7         None     None              x   \n",
      "3   427f1eed-b3bd-4078-94e3-156bf3ae21a6         None     None              x   \n",
      "4   48fd88b8-e3c0-4df5-94ef-62b936345bd9         None     None              x   \n",
      "5   d9aff179-9bc3-4268-b2d5-37eee8de309f         None     None              x   \n",
      "6   41f23955-b920-4f04-bcb7-ca1cd960aa45         None     None              x   \n",
      "7   cb2fdd74-7326-41d9-812f-9d88da447741         None     None              x   \n",
      "8   8ef82ee7-87b8-4f7d-8a01-374f52b60cbb         None     None              x   \n",
      "9   1f63fa52-f56b-4814-8eb3-5e4de849f3cb         None     None              x   \n",
      "10  13e77d45-9e2c-4ef3-89f5-7fa63cc3b808         None     None              x   \n",
      "11  7e714c35-83a4-4cb4-8ab5-d4fb2b31ccb7         None     None              x   \n",
      "12  380f932e-7871-4c72-94d3-5077861c9f53         None     None              x   \n",
      "13  3966e418-9017-4565-b24f-ed9455ef5593         None     None              x   \n",
      "14  99048106-f032-45a2-92c6-5a076f899a8a         None     None              x   \n",
      "15  3529f52a-3c09-46fc-944d-b3c619af7cd7         None     None              x   \n",
      "16  650c29d4-459c-412a-8000-c881af3c662a         None     None              x   \n",
      "17  9d0b7e50-53ac-42df-9175-c3f303387629         None     None              x   \n",
      "18  80ac049d-602e-44ff-a799-3be84acdfe55         None     None              x   \n",
      "19  e354ff47-4298-4d5a-a22e-794e327dee61         None     None              x   \n",
      "20  4977e6e3-e6ee-4d8c-8c43-9b1f027e07b1         None     None              x   \n",
      "21  16d8792c-b2f0-400d-b2a6-aa5c2e473728         None     None              x   \n",
      "22  eff96ddf-6dbb-4af3-a7bd-1f170e632dbc         None     None              x   \n",
      "23  7b21c653-d1d1-44d8-9772-790585915ae4         None     None              x   \n",
      "24  dfe8fbac-ff27-4746-a53a-f6220f3c63a6         None     None              x   \n",
      "25  98e05d3a-cdf5-4cac-bd41-fa747e29a2a4         None     None              x   \n",
      "26  23cd8f74-342a-4796-aeeb-07441bed75e1         None     None              x   \n",
      "27  3f7dad60-3de4-4ca9-ba5e-af87d33594e6         None     None              x   \n",
      "28  f2b9cae9-b1d9-4a00-ba62-ce81baec3d72         None     None              x   \n",
      "29  de5fce65-5a39-42c6-8d6e-914060c5f971         None     None              x   \n",
      "30  3d763d03-c042-4312-a7e3-ffae8fb877b4         None     None              x   \n",
      "31  d41375b6-70c1-4b71-9eab-0ae5f1763fd2         None     None              x   \n",
      "32  3fc5cbfd-354e-4f68-9248-a0853a763435         None     None              x   \n",
      "33  2b065a3c-e510-4f64-ab30-c94a93a0dc51         None     None              x   \n",
      "34  3c140a72-da07-443f-9386-04440fecb9a4         None     None              x   \n",
      "35  0002bf5f-e6ec-433b-b8bd-841e76c93483         None     None              x   \n",
      "36  306a25f0-fc21-4eee-b0bb-9d5a0a57694d         None     None              x   \n",
      "37  a4d75c37-d330-4400-9298-f19665f0043e         None     None              x   \n",
      "\n",
      "    commission     tax message  frozen  direction  total_frozen  \n",
      "0       5.0000    0.00    None       0          1             0  \n",
      "1       5.9750    0.00    None       0          1             0  \n",
      "2       5.0000    0.00    None       0          1             0  \n",
      "3       6.0175   24.07    None       0         -1             0  \n",
      "4       5.0000   19.50    None       0         -1             0  \n",
      "5       6.2325    0.00    None       0          1             0  \n",
      "6       5.0000    0.00    None       0          1             0  \n",
      "7      12.5250   50.10    None       0         -1             0  \n",
      "8       7.2450   28.98    None       0         -1             0  \n",
      "9      12.5000   50.00    None       0         -1             0  \n",
      "10      5.0000    0.00    None       0          1             0  \n",
      "11      6.3325    0.00    None       0          1             0  \n",
      "12      5.0000    0.00    None       0          1             0  \n",
      "13      6.2775    0.00    None       0          1             0  \n",
      "14      5.0000    0.00    None       0          1             0  \n",
      "15     25.3000  101.20    None       0         -1             0  \n",
      "16     15.1650   60.66    None       0         -1             0  \n",
      "17      6.2550    0.00    None       0          1             0  \n",
      "18      5.0000    0.00    None       0          1             0  \n",
      "19     31.4500  125.80    None       0         -1             0  \n",
      "20     18.3400   73.36    None       0         -1             0  \n",
      "21      6.3550    0.00    None       0          1             0  \n",
      "22     17.9375   71.75    None       0         -1             0  \n",
      "23      6.2425    0.00    None       0          1             0  \n",
      "24      5.0000    0.00    None       0          1             0  \n",
      "25      6.4400    0.00    None       0          1             0  \n",
      "26     20.6800   82.72    None       0         -1             0  \n",
      "27     51.3000  205.20    None       0         -1             0  \n",
      "28     20.5600   82.24    None       0         -1             0  \n",
      "29     50.8000  203.20    None       0         -1             0  \n",
      "30     20.7000   82.80    None       0         -1             0  \n",
      "31      6.3275    0.00    None       0          1             0  \n",
      "32     21.0400   84.16    None       0         -1             0  \n",
      "33     57.1725  228.69    None       0         -1             0  \n",
      "34      5.0000    0.00    None       0          1             0  \n",
      "35      6.5250    0.00    None       0          1             0  \n",
      "36     24.6150   98.46    None       0         -1             0  \n",
      "37      6.5150    0.00    None       0          1             0  \n"
     ]
    },
    {
     "name": "stdin",
     "output_type": "stream",
     "text": [
      " \n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "backtest: Settle!\n",
      "open      1.096000e+01\n",
      "high      1.107000e+01\n",
      "low       1.077000e+01\n",
      "close     1.100000e+01\n",
      "volume    8.266310e+05\n",
      "amount    9.048479e+08\n",
      "Name: (2019-01-29 00:00:00, 000001), dtype: float64\n",
      "---------------under is 当前全市场的market_data --------------\n",
      "                    open   high    low  close    volume       amount\n",
      "2019-01-29 000001  10.96  11.07  10.77   11.0  826631.0  904847872.0\n",
      "---------------under is 当前品种的market_data --------------\n",
      "                    open   high    low  close     volume        amount\n",
      "2019-01-02 000001   9.39   9.42   9.16   9.19   539386.0  4.986951e+08\n",
      "2019-01-03 000001   9.18   9.33   9.15   9.28   415537.0  3.844577e+08\n",
      "2019-01-04 000001   9.24   9.82   9.22   9.75  1481159.0  1.422150e+09\n",
      "2019-01-07 000001   9.84   9.85   9.63   9.74   865687.0  8.411664e+08\n",
      "2019-01-08 000001   9.73   9.74   9.62   9.66   402388.0  3.892478e+08\n",
      "2019-01-09 000001   9.74  10.08   9.70   9.94  1233486.0  1.229465e+09\n",
      "2019-01-10 000001   9.87  10.20   9.86  10.10  1071817.0  1.079711e+09\n",
      "2019-01-11 000001  10.11  10.22  10.05  10.20   696364.0  7.080018e+08\n",
      "2019-01-14 000001  10.22  10.25  10.07  10.11   500443.0  5.078629e+08\n",
      "2019-01-15 000001  10.11  10.28  10.09  10.24   542160.0  5.530273e+08\n",
      "2019-01-16 000001  10.24  10.50  10.23  10.48   977699.0  1.017495e+09\n",
      "2019-01-17 000001  10.54  10.57  10.17  10.25   882811.0  9.102121e+08\n",
      "2019-01-18 000001  10.34  10.49  10.28  10.43   738793.0  7.699736e+08\n",
      "2019-01-21 000001  10.34  10.47  10.32  10.34   659355.0  6.844657e+08\n",
      "2019-01-22 000001  10.34  10.44  10.26  10.28   424413.0  4.389915e+08\n",
      "2019-01-23 000001  10.29  10.47  10.29  10.35   537876.0  5.593844e+08\n",
      "2019-01-24 000001  10.40  10.55  10.37  10.52   679240.0  7.114957e+08\n",
      "2019-01-25 000001  10.56  11.04  10.55  11.00  2108362.0  2.299718e+09\n",
      "2019-01-28 000001  11.04  11.14  10.88  10.94  1035909.0  1.141854e+09\n",
      "2019-01-29 000001  10.96  11.07  10.77  11.00   826631.0  9.048479e+08\n",
      "000001\n",
      "---------------under is 账户情况和持仓情况 -------------------\n",
      "{'code': '000001', 'instrument_id': '000001', 'user_id': 'x', 'portfolio_cookie': 'default', 'username': 'quantaxis', 'position_id': 'd2b24d5c-fb1e-4a2e-97eb-f19b04f544ec', 'account_cookie': 'x', 'frozen': {}, 'name': None, 'spms_id': None, 'oms_id': None, 'market_type': 'stock_cn', 'exchange_id': None, 'moneypreset': 100000, 'moneypresetLeft': 100000, 'lastupdatetime': '', 'volume_long_today': 10000, 'volume_long_his': 0, 'volume_long': 10000, 'volume_short_today': 0, 'volume_short_his': 0, 'volume_short': 0, 'volume_long_frozen_today': 0, 'volume_long_frozen_his': 0, 'volume_long_frozen': 0, 'volume_short_frozen_today': 0, 'volume_short_frozen_his': 0, 'volume_short_frozen': 0, 'margin_long': 101120.0, 'margin_short': 0, 'margin': 101120.0, 'position_price_long': 10.112, 'position_cost_long': 101120.0, 'position_price_short': 0, 'position_cost_short': 0, 'open_price_long': 10.112, 'open_cost_long': 101120.0, 'open_price_short': 0, 'open_cost_short': 0, 'trades': [], 'orders': {}, 'last_price': 11.0, 'float_profit_long': 8880.0, 'float_profit_short': 0.0, 'float_profit': 8880.0, 'position_profit_long': 8880.0, 'position_profit_short': 0.0, 'position_profit': 8880.0}\n",
      "               datetime    code  price  amount          cash  \\\n",
      "0   2019-01-02 00:00:00  000001   9.19    1000  9.908050e+05   \n",
      "1   2019-01-02 00:00:00  000002  23.90    1000  9.668990e+05   \n",
      "2   2019-01-03 00:00:00  000001   9.28    1000  9.576140e+05   \n",
      "3   2019-01-03 00:00:00  000002  24.07   -1000  9.816539e+05   \n",
      "4   2019-01-04 00:00:00  000001   9.75   -2000  1.001129e+06   \n",
      "5   2019-01-04 00:00:00  000002  24.93    1000  9.761932e+05   \n",
      "6   2019-01-07 00:00:00  000001   9.74    1000  9.664482e+05   \n",
      "7   2019-01-07 00:00:00  000002  25.05   -2000  1.016486e+06   \n",
      "8   2019-01-08 00:00:00  000001   9.66   -3000  1.045429e+06   \n",
      "9   2019-01-08 00:00:00  000002  25.00   -2000  1.095367e+06   \n",
      "10  2019-01-09 00:00:00  000001   9.94    1000  1.085422e+06   \n",
      "11  2019-01-09 00:00:00  000002  25.33    1000  1.060086e+06   \n",
      "12  2019-01-10 00:00:00  000001  10.10    1000  1.049981e+06   \n",
      "13  2019-01-10 00:00:00  000002  25.11    1000  1.024864e+06   \n",
      "14  2019-01-11 00:00:00  000001  10.20    1000  1.014659e+06   \n",
      "15  2019-01-11 00:00:00  000002  25.30   -4000  1.115733e+06   \n",
      "16  2019-01-14 00:00:00  000001  10.11   -6000  1.176317e+06   \n",
      "17  2019-01-14 00:00:00  000002  25.02    1000  1.151291e+06   \n",
      "18  2019-01-15 00:00:00  000001  10.24    1000  1.141046e+06   \n",
      "19  2019-01-15 00:00:00  000002  25.16   -5000  1.266688e+06   \n",
      "20  2019-01-16 00:00:00  000001  10.48   -7000  1.339957e+06   \n",
      "21  2019-01-16 00:00:00  000002  25.42    1000  1.314530e+06   \n",
      "22  2019-01-17 00:00:00  000001  10.25   -7000  1.386191e+06   \n",
      "23  2019-01-17 00:00:00  000002  24.97    1000  1.361214e+06   \n",
      "24  2019-01-18 00:00:00  000001  10.43    1000  1.350779e+06   \n",
      "25  2019-01-18 00:00:00  000002  25.76    1000  1.325013e+06   \n",
      "26  2019-01-21 00:00:00  000001  10.34   -8000  1.407630e+06   \n",
      "27  2019-01-21 00:00:00  000002  25.65   -8000  1.612573e+06   \n",
      "28  2019-01-22 00:00:00  000001  10.28   -8000  1.694710e+06   \n",
      "29  2019-01-22 00:00:00  000002  25.40   -8000  1.897656e+06   \n",
      "30  2019-01-23 00:00:00  000001  10.35   -8000  1.980353e+06   \n",
      "31  2019-01-23 00:00:00  000002  25.31    1000  1.955036e+06   \n",
      "32  2019-01-24 00:00:00  000001  10.52   -8000  2.039091e+06   \n",
      "33  2019-01-24 00:00:00  000002  25.41   -9000  2.267495e+06   \n",
      "34  2019-01-25 00:00:00  000001  11.00    1000  2.256490e+06   \n",
      "35  2019-01-25 00:00:00  000002  26.10    1000  2.230384e+06   \n",
      "36  2019-01-28 00:00:00  000001  10.94   -9000  2.328721e+06   \n",
      "37  2019-01-28 00:00:00  000002  26.06    1000  2.302654e+06   \n",
      "38  2019-01-29 00:00:00  000001  11.00    1000  2.291649e+06   \n",
      "\n",
      "                                order_id realorder_id trade_id account_cookie  \\\n",
      "0   e23f9e01-e8d2-4a05-93ef-9163ce7a83ee         None     None              x   \n",
      "1   1f430faa-86d1-440b-abf7-a7feddc17954         None     None              x   \n",
      "2   0230d608-91cc-422e-8deb-218f4faef3d7         None     None              x   \n",
      "3   427f1eed-b3bd-4078-94e3-156bf3ae21a6         None     None              x   \n",
      "4   48fd88b8-e3c0-4df5-94ef-62b936345bd9         None     None              x   \n",
      "5   d9aff179-9bc3-4268-b2d5-37eee8de309f         None     None              x   \n",
      "6   41f23955-b920-4f04-bcb7-ca1cd960aa45         None     None              x   \n",
      "7   cb2fdd74-7326-41d9-812f-9d88da447741         None     None              x   \n",
      "8   8ef82ee7-87b8-4f7d-8a01-374f52b60cbb         None     None              x   \n",
      "9   1f63fa52-f56b-4814-8eb3-5e4de849f3cb         None     None              x   \n",
      "10  13e77d45-9e2c-4ef3-89f5-7fa63cc3b808         None     None              x   \n",
      "11  7e714c35-83a4-4cb4-8ab5-d4fb2b31ccb7         None     None              x   \n",
      "12  380f932e-7871-4c72-94d3-5077861c9f53         None     None              x   \n",
      "13  3966e418-9017-4565-b24f-ed9455ef5593         None     None              x   \n",
      "14  99048106-f032-45a2-92c6-5a076f899a8a         None     None              x   \n",
      "15  3529f52a-3c09-46fc-944d-b3c619af7cd7         None     None              x   \n",
      "16  650c29d4-459c-412a-8000-c881af3c662a         None     None              x   \n",
      "17  9d0b7e50-53ac-42df-9175-c3f303387629         None     None              x   \n",
      "18  80ac049d-602e-44ff-a799-3be84acdfe55         None     None              x   \n",
      "19  e354ff47-4298-4d5a-a22e-794e327dee61         None     None              x   \n",
      "20  4977e6e3-e6ee-4d8c-8c43-9b1f027e07b1         None     None              x   \n",
      "21  16d8792c-b2f0-400d-b2a6-aa5c2e473728         None     None              x   \n",
      "22  eff96ddf-6dbb-4af3-a7bd-1f170e632dbc         None     None              x   \n",
      "23  7b21c653-d1d1-44d8-9772-790585915ae4         None     None              x   \n",
      "24  dfe8fbac-ff27-4746-a53a-f6220f3c63a6         None     None              x   \n",
      "25  98e05d3a-cdf5-4cac-bd41-fa747e29a2a4         None     None              x   \n",
      "26  23cd8f74-342a-4796-aeeb-07441bed75e1         None     None              x   \n",
      "27  3f7dad60-3de4-4ca9-ba5e-af87d33594e6         None     None              x   \n",
      "28  f2b9cae9-b1d9-4a00-ba62-ce81baec3d72         None     None              x   \n",
      "29  de5fce65-5a39-42c6-8d6e-914060c5f971         None     None              x   \n",
      "30  3d763d03-c042-4312-a7e3-ffae8fb877b4         None     None              x   \n",
      "31  d41375b6-70c1-4b71-9eab-0ae5f1763fd2         None     None              x   \n",
      "32  3fc5cbfd-354e-4f68-9248-a0853a763435         None     None              x   \n",
      "33  2b065a3c-e510-4f64-ab30-c94a93a0dc51         None     None              x   \n",
      "34  3c140a72-da07-443f-9386-04440fecb9a4         None     None              x   \n",
      "35  0002bf5f-e6ec-433b-b8bd-841e76c93483         None     None              x   \n",
      "36  306a25f0-fc21-4eee-b0bb-9d5a0a57694d         None     None              x   \n",
      "37  a4d75c37-d330-4400-9298-f19665f0043e         None     None              x   \n",
      "38  4ea50c6e-dc9a-4372-a9a5-86ce216c2199         None     None              x   \n",
      "\n",
      "    commission     tax message  frozen  direction  total_frozen  \n",
      "0       5.0000    0.00    None       0          1             0  \n",
      "1       5.9750    0.00    None       0          1             0  \n",
      "2       5.0000    0.00    None       0          1             0  \n",
      "3       6.0175   24.07    None       0         -1             0  \n",
      "4       5.0000   19.50    None       0         -1             0  \n",
      "5       6.2325    0.00    None       0          1             0  \n",
      "6       5.0000    0.00    None       0          1             0  \n",
      "7      12.5250   50.10    None       0         -1             0  \n",
      "8       7.2450   28.98    None       0         -1             0  \n",
      "9      12.5000   50.00    None       0         -1             0  \n",
      "10      5.0000    0.00    None       0          1             0  \n",
      "11      6.3325    0.00    None       0          1             0  \n",
      "12      5.0000    0.00    None       0          1             0  \n",
      "13      6.2775    0.00    None       0          1             0  \n",
      "14      5.0000    0.00    None       0          1             0  \n",
      "15     25.3000  101.20    None       0         -1             0  \n",
      "16     15.1650   60.66    None       0         -1             0  \n",
      "17      6.2550    0.00    None       0          1             0  \n",
      "18      5.0000    0.00    None       0          1             0  \n",
      "19     31.4500  125.80    None       0         -1             0  \n",
      "20     18.3400   73.36    None       0         -1             0  \n",
      "21      6.3550    0.00    None       0          1             0  \n",
      "22     17.9375   71.75    None       0         -1             0  \n",
      "23      6.2425    0.00    None       0          1             0  \n",
      "24      5.0000    0.00    None       0          1             0  \n",
      "25      6.4400    0.00    None       0          1             0  \n",
      "26     20.6800   82.72    None       0         -1             0  \n",
      "27     51.3000  205.20    None       0         -1             0  \n",
      "28     20.5600   82.24    None       0         -1             0  \n",
      "29     50.8000  203.20    None       0         -1             0  \n",
      "30     20.7000   82.80    None       0         -1             0  \n",
      "31      6.3275    0.00    None       0          1             0  \n",
      "32     21.0400   84.16    None       0         -1             0  \n",
      "33     57.1725  228.69    None       0         -1             0  \n",
      "34      5.0000    0.00    None       0          1             0  \n",
      "35      6.5250    0.00    None       0          1             0  \n",
      "36     24.6150   98.46    None       0         -1             0  \n",
      "37      6.5150    0.00    None       0          1             0  \n",
      "38      5.0000    0.00    None       0          1             0  \n"
     ]
    },
    {
     "name": "stdin",
     "output_type": "stream",
     "text": [
      " \n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "open      2.591000e+01\n",
      "high      2.688000e+01\n",
      "low       2.587000e+01\n",
      "close     2.688000e+01\n",
      "volume    3.680710e+05\n",
      "amount    9.742794e+08\n",
      "Name: (2019-01-29 00:00:00, 000002), dtype: float64\n",
      "---------------under is 当前全市场的market_data --------------\n",
      "                    open   high    low  close    volume       amount\n",
      "2019-01-29 000001  10.96  11.07  10.77  11.00  826631.0  904847872.0\n",
      "           000002  25.91  26.88  25.87  26.88  368071.0  974279360.0\n",
      "---------------under is 当前品种的market_data --------------\n",
      "                    open   high    low  close    volume        amount\n",
      "2019-01-02 000002  23.83  24.09  23.67  23.90  247010.0  5.893846e+08\n",
      "2019-01-03 000002  23.79  24.50  23.71  24.07  222353.0  5.363333e+08\n",
      "2019-01-04 000002  23.91  25.00  23.85  24.93  377727.0  9.270117e+08\n",
      "2019-01-07 000002  25.29  25.53  24.99  25.05  427154.0  1.077909e+09\n",
      "2019-01-08 000002  25.05  25.20  24.63  25.00  214382.0  5.336044e+08\n",
      "2019-01-09 000002  25.40  25.88  25.11  25.33  340140.0  8.670814e+08\n",
      "2019-01-10 000002  25.22  25.56  25.03  25.11  224649.0  5.689526e+08\n",
      "2019-01-11 000002  25.10  25.54  25.01  25.30  240694.0  6.069947e+08\n",
      "2019-01-14 000002  25.13  25.30  24.92  25.02  183281.0  4.591518e+08\n",
      "2019-01-15 000002  25.00  25.16  24.32  25.16  368758.0  9.149835e+08\n",
      "2019-01-16 000002  25.15  25.50  24.83  25.42  267466.0  6.766856e+08\n",
      "2019-01-17 000002  25.50  25.50  24.94  24.97  245895.0  6.188767e+08\n",
      "2019-01-18 000002  25.00  25.76  24.99  25.76  365723.0  9.334642e+08\n",
      "2019-01-21 000002  25.71  25.95  25.40  25.65  255499.0  6.558207e+08\n",
      "2019-01-22 000002  25.50  26.17  25.23  25.40  379336.0  9.748227e+08\n",
      "2019-01-23 000002  25.35  25.49  25.20  25.31  146847.0  3.718901e+08\n",
      "2019-01-24 000002  25.42  25.54  24.93  25.41  234931.0  5.928229e+08\n",
      "2019-01-25 000002  25.51  26.35  25.49  26.10  451756.0  1.176480e+09\n",
      "2019-01-28 000002  26.20  26.62  25.86  26.06  308906.0  8.102888e+08\n",
      "2019-01-29 000002  25.91  26.88  25.87  26.88  368071.0  9.742794e+08\n",
      "000002\n",
      "---------------under is 账户情况和持仓情况 -------------------\n",
      "{'code': '000002', 'instrument_id': '000002', 'user_id': 'x', 'portfolio_cookie': 'default', 'username': 'quantaxis', 'position_id': '5aa694d0-3861-43a8-9efc-84f380138bea', 'account_cookie': 'x', 'frozen': {}, 'name': None, 'spms_id': None, 'oms_id': None, 'market_type': 'stock_cn', 'exchange_id': None, 'moneypreset': 100000, 'moneypresetLeft': 100000, 'lastupdatetime': '', 'volume_long_today': 11000, 'volume_long_his': 0, 'volume_long': 11000, 'volume_short_today': 0, 'volume_short_his': 0, 'volume_short': 0, 'volume_long_frozen_today': 0, 'volume_long_frozen_his': 0, 'volume_long_frozen': 0, 'volume_short_frozen_today': 0, 'volume_short_frozen_his': 0, 'volume_short_frozen': 0, 'margin_long': 277910.0, 'margin_short': 0, 'margin': 277910.0, 'position_price_long': 25.264545454545456, 'position_cost_long': 277910.0, 'position_price_short': 0, 'position_cost_short': 0, 'open_price_long': 25.264545454545456, 'open_cost_long': 277910.0, 'open_price_short': 0, 'open_cost_short': 0, 'trades': [], 'orders': {}, 'last_price': 26.88, 'float_profit_long': 17770.0, 'float_profit_short': 0.0, 'float_profit': 17770.0, 'position_profit_long': 17770.0, 'position_profit_short': 0.0, 'position_profit': 17770.0}\n",
      "               datetime    code  price  amount          cash  \\\n",
      "0   2019-01-02 00:00:00  000001   9.19    1000  9.908050e+05   \n",
      "1   2019-01-02 00:00:00  000002  23.90    1000  9.668990e+05   \n",
      "2   2019-01-03 00:00:00  000001   9.28    1000  9.576140e+05   \n",
      "3   2019-01-03 00:00:00  000002  24.07   -1000  9.816539e+05   \n",
      "4   2019-01-04 00:00:00  000001   9.75   -2000  1.001129e+06   \n",
      "5   2019-01-04 00:00:00  000002  24.93    1000  9.761932e+05   \n",
      "6   2019-01-07 00:00:00  000001   9.74    1000  9.664482e+05   \n",
      "7   2019-01-07 00:00:00  000002  25.05   -2000  1.016486e+06   \n",
      "8   2019-01-08 00:00:00  000001   9.66   -3000  1.045429e+06   \n",
      "9   2019-01-08 00:00:00  000002  25.00   -2000  1.095367e+06   \n",
      "10  2019-01-09 00:00:00  000001   9.94    1000  1.085422e+06   \n",
      "11  2019-01-09 00:00:00  000002  25.33    1000  1.060086e+06   \n",
      "12  2019-01-10 00:00:00  000001  10.10    1000  1.049981e+06   \n",
      "13  2019-01-10 00:00:00  000002  25.11    1000  1.024864e+06   \n",
      "14  2019-01-11 00:00:00  000001  10.20    1000  1.014659e+06   \n",
      "15  2019-01-11 00:00:00  000002  25.30   -4000  1.115733e+06   \n",
      "16  2019-01-14 00:00:00  000001  10.11   -6000  1.176317e+06   \n",
      "17  2019-01-14 00:00:00  000002  25.02    1000  1.151291e+06   \n",
      "18  2019-01-15 00:00:00  000001  10.24    1000  1.141046e+06   \n",
      "19  2019-01-15 00:00:00  000002  25.16   -5000  1.266688e+06   \n",
      "20  2019-01-16 00:00:00  000001  10.48   -7000  1.339957e+06   \n",
      "21  2019-01-16 00:00:00  000002  25.42    1000  1.314530e+06   \n",
      "22  2019-01-17 00:00:00  000001  10.25   -7000  1.386191e+06   \n",
      "23  2019-01-17 00:00:00  000002  24.97    1000  1.361214e+06   \n",
      "24  2019-01-18 00:00:00  000001  10.43    1000  1.350779e+06   \n",
      "25  2019-01-18 00:00:00  000002  25.76    1000  1.325013e+06   \n",
      "26  2019-01-21 00:00:00  000001  10.34   -8000  1.407630e+06   \n",
      "27  2019-01-21 00:00:00  000002  25.65   -8000  1.612573e+06   \n",
      "28  2019-01-22 00:00:00  000001  10.28   -8000  1.694710e+06   \n",
      "29  2019-01-22 00:00:00  000002  25.40   -8000  1.897656e+06   \n",
      "30  2019-01-23 00:00:00  000001  10.35   -8000  1.980353e+06   \n",
      "31  2019-01-23 00:00:00  000002  25.31    1000  1.955036e+06   \n",
      "32  2019-01-24 00:00:00  000001  10.52   -8000  2.039091e+06   \n",
      "33  2019-01-24 00:00:00  000002  25.41   -9000  2.267495e+06   \n",
      "34  2019-01-25 00:00:00  000001  11.00    1000  2.256490e+06   \n",
      "35  2019-01-25 00:00:00  000002  26.10    1000  2.230384e+06   \n",
      "36  2019-01-28 00:00:00  000001  10.94   -9000  2.328721e+06   \n",
      "37  2019-01-28 00:00:00  000002  26.06    1000  2.302654e+06   \n",
      "38  2019-01-29 00:00:00  000001  11.00    1000  2.291649e+06   \n",
      "39  2019-01-29 00:00:00  000002  26.88  -11000  2.586960e+06   \n",
      "\n",
      "                                order_id realorder_id trade_id account_cookie  \\\n",
      "0   e23f9e01-e8d2-4a05-93ef-9163ce7a83ee         None     None              x   \n",
      "1   1f430faa-86d1-440b-abf7-a7feddc17954         None     None              x   \n",
      "2   0230d608-91cc-422e-8deb-218f4faef3d7         None     None              x   \n",
      "3   427f1eed-b3bd-4078-94e3-156bf3ae21a6         None     None              x   \n",
      "4   48fd88b8-e3c0-4df5-94ef-62b936345bd9         None     None              x   \n",
      "5   d9aff179-9bc3-4268-b2d5-37eee8de309f         None     None              x   \n",
      "6   41f23955-b920-4f04-bcb7-ca1cd960aa45         None     None              x   \n",
      "7   cb2fdd74-7326-41d9-812f-9d88da447741         None     None              x   \n",
      "8   8ef82ee7-87b8-4f7d-8a01-374f52b60cbb         None     None              x   \n",
      "9   1f63fa52-f56b-4814-8eb3-5e4de849f3cb         None     None              x   \n",
      "10  13e77d45-9e2c-4ef3-89f5-7fa63cc3b808         None     None              x   \n",
      "11  7e714c35-83a4-4cb4-8ab5-d4fb2b31ccb7         None     None              x   \n",
      "12  380f932e-7871-4c72-94d3-5077861c9f53         None     None              x   \n",
      "13  3966e418-9017-4565-b24f-ed9455ef5593         None     None              x   \n",
      "14  99048106-f032-45a2-92c6-5a076f899a8a         None     None              x   \n",
      "15  3529f52a-3c09-46fc-944d-b3c619af7cd7         None     None              x   \n",
      "16  650c29d4-459c-412a-8000-c881af3c662a         None     None              x   \n",
      "17  9d0b7e50-53ac-42df-9175-c3f303387629         None     None              x   \n",
      "18  80ac049d-602e-44ff-a799-3be84acdfe55         None     None              x   \n",
      "19  e354ff47-4298-4d5a-a22e-794e327dee61         None     None              x   \n",
      "20  4977e6e3-e6ee-4d8c-8c43-9b1f027e07b1         None     None              x   \n",
      "21  16d8792c-b2f0-400d-b2a6-aa5c2e473728         None     None              x   \n",
      "22  eff96ddf-6dbb-4af3-a7bd-1f170e632dbc         None     None              x   \n",
      "23  7b21c653-d1d1-44d8-9772-790585915ae4         None     None              x   \n",
      "24  dfe8fbac-ff27-4746-a53a-f6220f3c63a6         None     None              x   \n",
      "25  98e05d3a-cdf5-4cac-bd41-fa747e29a2a4         None     None              x   \n",
      "26  23cd8f74-342a-4796-aeeb-07441bed75e1         None     None              x   \n",
      "27  3f7dad60-3de4-4ca9-ba5e-af87d33594e6         None     None              x   \n",
      "28  f2b9cae9-b1d9-4a00-ba62-ce81baec3d72         None     None              x   \n",
      "29  de5fce65-5a39-42c6-8d6e-914060c5f971         None     None              x   \n",
      "30  3d763d03-c042-4312-a7e3-ffae8fb877b4         None     None              x   \n",
      "31  d41375b6-70c1-4b71-9eab-0ae5f1763fd2         None     None              x   \n",
      "32  3fc5cbfd-354e-4f68-9248-a0853a763435         None     None              x   \n",
      "33  2b065a3c-e510-4f64-ab30-c94a93a0dc51         None     None              x   \n",
      "34  3c140a72-da07-443f-9386-04440fecb9a4         None     None              x   \n",
      "35  0002bf5f-e6ec-433b-b8bd-841e76c93483         None     None              x   \n",
      "36  306a25f0-fc21-4eee-b0bb-9d5a0a57694d         None     None              x   \n",
      "37  a4d75c37-d330-4400-9298-f19665f0043e         None     None              x   \n",
      "38  4ea50c6e-dc9a-4372-a9a5-86ce216c2199         None     None              x   \n",
      "39  9ca9217d-a510-4344-8def-9be6e67ab42f         None     None              x   \n",
      "\n",
      "    commission     tax message  frozen  direction  total_frozen  \n",
      "0       5.0000    0.00    None       0          1             0  \n",
      "1       5.9750    0.00    None       0          1             0  \n",
      "2       5.0000    0.00    None       0          1             0  \n",
      "3       6.0175   24.07    None       0         -1             0  \n",
      "4       5.0000   19.50    None       0         -1             0  \n",
      "5       6.2325    0.00    None       0          1             0  \n",
      "6       5.0000    0.00    None       0          1             0  \n",
      "7      12.5250   50.10    None       0         -1             0  \n",
      "8       7.2450   28.98    None       0         -1             0  \n",
      "9      12.5000   50.00    None       0         -1             0  \n",
      "10      5.0000    0.00    None       0          1             0  \n",
      "11      6.3325    0.00    None       0          1             0  \n",
      "12      5.0000    0.00    None       0          1             0  \n",
      "13      6.2775    0.00    None       0          1             0  \n",
      "14      5.0000    0.00    None       0          1             0  \n",
      "15     25.3000  101.20    None       0         -1             0  \n",
      "16     15.1650   60.66    None       0         -1             0  \n",
      "17      6.2550    0.00    None       0          1             0  \n",
      "18      5.0000    0.00    None       0          1             0  \n",
      "19     31.4500  125.80    None       0         -1             0  \n",
      "20     18.3400   73.36    None       0         -1             0  \n",
      "21      6.3550    0.00    None       0          1             0  \n",
      "22     17.9375   71.75    None       0         -1             0  \n",
      "23      6.2425    0.00    None       0          1             0  \n",
      "24      5.0000    0.00    None       0          1             0  \n",
      "25      6.4400    0.00    None       0          1             0  \n",
      "26     20.6800   82.72    None       0         -1             0  \n",
      "27     51.3000  205.20    None       0         -1             0  \n",
      "28     20.5600   82.24    None       0         -1             0  \n",
      "29     50.8000  203.20    None       0         -1             0  \n",
      "30     20.7000   82.80    None       0         -1             0  \n",
      "31      6.3275    0.00    None       0          1             0  \n",
      "32     21.0400   84.16    None       0         -1             0  \n",
      "33     57.1725  228.69    None       0         -1             0  \n",
      "34      5.0000    0.00    None       0          1             0  \n",
      "35      6.5250    0.00    None       0          1             0  \n",
      "36     24.6150   98.46    None       0         -1             0  \n",
      "37      6.5150    0.00    None       0          1             0  \n",
      "38      5.0000    0.00    None       0          1             0  \n",
      "39     73.9200  295.68    None       0         -1             0  \n"
     ]
    },
    {
     "name": "stdin",
     "output_type": "stream",
     "text": [
      " \n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "backtest: Settle!\n",
      "open      1.095000e+01\n",
      "high      1.118000e+01\n",
      "low       1.086000e+01\n",
      "close     1.095000e+01\n",
      "volume    7.120010e+05\n",
      "amount    7.852045e+08\n",
      "Name: (2019-01-30 00:00:00, 000001), dtype: float64\n",
      "---------------under is 当前全市场的market_data --------------\n",
      "                    open   high    low  close    volume       amount\n",
      "2019-01-30 000001  10.95  11.18  10.86  10.95  712001.0  785204544.0\n",
      "---------------under is 当前品种的market_data --------------\n",
      "                    open   high    low  close     volume        amount\n",
      "2019-01-02 000001   9.39   9.42   9.16   9.19   539386.0  4.986951e+08\n",
      "2019-01-03 000001   9.18   9.33   9.15   9.28   415537.0  3.844577e+08\n",
      "2019-01-04 000001   9.24   9.82   9.22   9.75  1481159.0  1.422150e+09\n",
      "2019-01-07 000001   9.84   9.85   9.63   9.74   865687.0  8.411664e+08\n",
      "2019-01-08 000001   9.73   9.74   9.62   9.66   402388.0  3.892478e+08\n",
      "2019-01-09 000001   9.74  10.08   9.70   9.94  1233486.0  1.229465e+09\n",
      "2019-01-10 000001   9.87  10.20   9.86  10.10  1071817.0  1.079711e+09\n",
      "2019-01-11 000001  10.11  10.22  10.05  10.20   696364.0  7.080018e+08\n",
      "2019-01-14 000001  10.22  10.25  10.07  10.11   500443.0  5.078629e+08\n",
      "2019-01-15 000001  10.11  10.28  10.09  10.24   542160.0  5.530273e+08\n",
      "2019-01-16 000001  10.24  10.50  10.23  10.48   977699.0  1.017495e+09\n",
      "2019-01-17 000001  10.54  10.57  10.17  10.25   882811.0  9.102121e+08\n",
      "2019-01-18 000001  10.34  10.49  10.28  10.43   738793.0  7.699736e+08\n",
      "2019-01-21 000001  10.34  10.47  10.32  10.34   659355.0  6.844657e+08\n",
      "2019-01-22 000001  10.34  10.44  10.26  10.28   424413.0  4.389915e+08\n",
      "2019-01-23 000001  10.29  10.47  10.29  10.35   537876.0  5.593844e+08\n",
      "2019-01-24 000001  10.40  10.55  10.37  10.52   679240.0  7.114957e+08\n",
      "2019-01-25 000001  10.56  11.04  10.55  11.00  2108362.0  2.299718e+09\n",
      "2019-01-28 000001  11.04  11.14  10.88  10.94  1035909.0  1.141854e+09\n",
      "2019-01-29 000001  10.96  11.07  10.77  11.00   826631.0  9.048479e+08\n",
      "2019-01-30 000001  10.95  11.18  10.86  10.95   712001.0  7.852045e+08\n",
      "000001\n",
      "---------------under is 账户情况和持仓情况 -------------------\n",
      "{'code': '000001', 'instrument_id': '000001', 'user_id': 'x', 'portfolio_cookie': 'default', 'username': 'quantaxis', 'position_id': 'd2b24d5c-fb1e-4a2e-97eb-f19b04f544ec', 'account_cookie': 'x', 'frozen': {}, 'name': None, 'spms_id': None, 'oms_id': None, 'market_type': 'stock_cn', 'exchange_id': None, 'moneypreset': 100000, 'moneypresetLeft': 100000, 'lastupdatetime': '', 'volume_long_today': 10000, 'volume_long_his': 0, 'volume_long': 10000, 'volume_short_today': 0, 'volume_short_his': 0, 'volume_short': 0, 'volume_long_frozen_today': 0, 'volume_long_frozen_his': 0, 'volume_long_frozen': 0, 'volume_short_frozen_today': 0, 'volume_short_frozen_his': 0, 'volume_short_frozen': 0, 'margin_long': 101120.0, 'margin_short': 0, 'margin': 101120.0, 'position_price_long': 10.112, 'position_cost_long': 101120.0, 'position_price_short': 0, 'position_cost_short': 0, 'open_price_long': 10.112, 'open_cost_long': 101120.0, 'open_price_short': 0, 'open_cost_short': 0, 'trades': [], 'orders': {}, 'last_price': 10.95, 'float_profit_long': 8380.0, 'float_profit_short': 0.0, 'float_profit': 8380.0, 'position_profit_long': 8380.0, 'position_profit_short': 0.0, 'position_profit': 8380.0}\n",
      "               datetime    code  price  amount          cash  \\\n",
      "0   2019-01-02 00:00:00  000001   9.19    1000  9.908050e+05   \n",
      "1   2019-01-02 00:00:00  000002  23.90    1000  9.668990e+05   \n",
      "2   2019-01-03 00:00:00  000001   9.28    1000  9.576140e+05   \n",
      "3   2019-01-03 00:00:00  000002  24.07   -1000  9.816539e+05   \n",
      "4   2019-01-04 00:00:00  000001   9.75   -2000  1.001129e+06   \n",
      "5   2019-01-04 00:00:00  000002  24.93    1000  9.761932e+05   \n",
      "6   2019-01-07 00:00:00  000001   9.74    1000  9.664482e+05   \n",
      "7   2019-01-07 00:00:00  000002  25.05   -2000  1.016486e+06   \n",
      "8   2019-01-08 00:00:00  000001   9.66   -3000  1.045429e+06   \n",
      "9   2019-01-08 00:00:00  000002  25.00   -2000  1.095367e+06   \n",
      "10  2019-01-09 00:00:00  000001   9.94    1000  1.085422e+06   \n",
      "11  2019-01-09 00:00:00  000002  25.33    1000  1.060086e+06   \n",
      "12  2019-01-10 00:00:00  000001  10.10    1000  1.049981e+06   \n",
      "13  2019-01-10 00:00:00  000002  25.11    1000  1.024864e+06   \n",
      "14  2019-01-11 00:00:00  000001  10.20    1000  1.014659e+06   \n",
      "15  2019-01-11 00:00:00  000002  25.30   -4000  1.115733e+06   \n",
      "16  2019-01-14 00:00:00  000001  10.11   -6000  1.176317e+06   \n",
      "17  2019-01-14 00:00:00  000002  25.02    1000  1.151291e+06   \n",
      "18  2019-01-15 00:00:00  000001  10.24    1000  1.141046e+06   \n",
      "19  2019-01-15 00:00:00  000002  25.16   -5000  1.266688e+06   \n",
      "20  2019-01-16 00:00:00  000001  10.48   -7000  1.339957e+06   \n",
      "21  2019-01-16 00:00:00  000002  25.42    1000  1.314530e+06   \n",
      "22  2019-01-17 00:00:00  000001  10.25   -7000  1.386191e+06   \n",
      "23  2019-01-17 00:00:00  000002  24.97    1000  1.361214e+06   \n",
      "24  2019-01-18 00:00:00  000001  10.43    1000  1.350779e+06   \n",
      "25  2019-01-18 00:00:00  000002  25.76    1000  1.325013e+06   \n",
      "26  2019-01-21 00:00:00  000001  10.34   -8000  1.407630e+06   \n",
      "27  2019-01-21 00:00:00  000002  25.65   -8000  1.612573e+06   \n",
      "28  2019-01-22 00:00:00  000001  10.28   -8000  1.694710e+06   \n",
      "29  2019-01-22 00:00:00  000002  25.40   -8000  1.897656e+06   \n",
      "30  2019-01-23 00:00:00  000001  10.35   -8000  1.980353e+06   \n",
      "31  2019-01-23 00:00:00  000002  25.31    1000  1.955036e+06   \n",
      "32  2019-01-24 00:00:00  000001  10.52   -8000  2.039091e+06   \n",
      "33  2019-01-24 00:00:00  000002  25.41   -9000  2.267495e+06   \n",
      "34  2019-01-25 00:00:00  000001  11.00    1000  2.256490e+06   \n",
      "35  2019-01-25 00:00:00  000002  26.10    1000  2.230384e+06   \n",
      "36  2019-01-28 00:00:00  000001  10.94   -9000  2.328721e+06   \n",
      "37  2019-01-28 00:00:00  000002  26.06    1000  2.302654e+06   \n",
      "38  2019-01-29 00:00:00  000001  11.00    1000  2.291649e+06   \n",
      "39  2019-01-29 00:00:00  000002  26.88  -11000  2.586960e+06   \n",
      "40  2019-01-30 00:00:00  000001  10.95  -10000  2.696323e+06   \n",
      "\n",
      "                                order_id realorder_id trade_id account_cookie  \\\n",
      "0   e23f9e01-e8d2-4a05-93ef-9163ce7a83ee         None     None              x   \n",
      "1   1f430faa-86d1-440b-abf7-a7feddc17954         None     None              x   \n",
      "2   0230d608-91cc-422e-8deb-218f4faef3d7         None     None              x   \n",
      "3   427f1eed-b3bd-4078-94e3-156bf3ae21a6         None     None              x   \n",
      "4   48fd88b8-e3c0-4df5-94ef-62b936345bd9         None     None              x   \n",
      "5   d9aff179-9bc3-4268-b2d5-37eee8de309f         None     None              x   \n",
      "6   41f23955-b920-4f04-bcb7-ca1cd960aa45         None     None              x   \n",
      "7   cb2fdd74-7326-41d9-812f-9d88da447741         None     None              x   \n",
      "8   8ef82ee7-87b8-4f7d-8a01-374f52b60cbb         None     None              x   \n",
      "9   1f63fa52-f56b-4814-8eb3-5e4de849f3cb         None     None              x   \n",
      "10  13e77d45-9e2c-4ef3-89f5-7fa63cc3b808         None     None              x   \n",
      "11  7e714c35-83a4-4cb4-8ab5-d4fb2b31ccb7         None     None              x   \n",
      "12  380f932e-7871-4c72-94d3-5077861c9f53         None     None              x   \n",
      "13  3966e418-9017-4565-b24f-ed9455ef5593         None     None              x   \n",
      "14  99048106-f032-45a2-92c6-5a076f899a8a         None     None              x   \n",
      "15  3529f52a-3c09-46fc-944d-b3c619af7cd7         None     None              x   \n",
      "16  650c29d4-459c-412a-8000-c881af3c662a         None     None              x   \n",
      "17  9d0b7e50-53ac-42df-9175-c3f303387629         None     None              x   \n",
      "18  80ac049d-602e-44ff-a799-3be84acdfe55         None     None              x   \n",
      "19  e354ff47-4298-4d5a-a22e-794e327dee61         None     None              x   \n",
      "20  4977e6e3-e6ee-4d8c-8c43-9b1f027e07b1         None     None              x   \n",
      "21  16d8792c-b2f0-400d-b2a6-aa5c2e473728         None     None              x   \n",
      "22  eff96ddf-6dbb-4af3-a7bd-1f170e632dbc         None     None              x   \n",
      "23  7b21c653-d1d1-44d8-9772-790585915ae4         None     None              x   \n",
      "24  dfe8fbac-ff27-4746-a53a-f6220f3c63a6         None     None              x   \n",
      "25  98e05d3a-cdf5-4cac-bd41-fa747e29a2a4         None     None              x   \n",
      "26  23cd8f74-342a-4796-aeeb-07441bed75e1         None     None              x   \n",
      "27  3f7dad60-3de4-4ca9-ba5e-af87d33594e6         None     None              x   \n",
      "28  f2b9cae9-b1d9-4a00-ba62-ce81baec3d72         None     None              x   \n",
      "29  de5fce65-5a39-42c6-8d6e-914060c5f971         None     None              x   \n",
      "30  3d763d03-c042-4312-a7e3-ffae8fb877b4         None     None              x   \n",
      "31  d41375b6-70c1-4b71-9eab-0ae5f1763fd2         None     None              x   \n",
      "32  3fc5cbfd-354e-4f68-9248-a0853a763435         None     None              x   \n",
      "33  2b065a3c-e510-4f64-ab30-c94a93a0dc51         None     None              x   \n",
      "34  3c140a72-da07-443f-9386-04440fecb9a4         None     None              x   \n",
      "35  0002bf5f-e6ec-433b-b8bd-841e76c93483         None     None              x   \n",
      "36  306a25f0-fc21-4eee-b0bb-9d5a0a57694d         None     None              x   \n",
      "37  a4d75c37-d330-4400-9298-f19665f0043e         None     None              x   \n",
      "38  4ea50c6e-dc9a-4372-a9a5-86ce216c2199         None     None              x   \n",
      "39  9ca9217d-a510-4344-8def-9be6e67ab42f         None     None              x   \n",
      "40  a577bff0-f7d2-4b60-a31c-bcee0cf7dc8f         None     None              x   \n",
      "\n",
      "    commission     tax message  frozen  direction  total_frozen  \n",
      "0       5.0000    0.00    None       0          1             0  \n",
      "1       5.9750    0.00    None       0          1             0  \n",
      "2       5.0000    0.00    None       0          1             0  \n",
      "3       6.0175   24.07    None       0         -1             0  \n",
      "4       5.0000   19.50    None       0         -1             0  \n",
      "5       6.2325    0.00    None       0          1             0  \n",
      "6       5.0000    0.00    None       0          1             0  \n",
      "7      12.5250   50.10    None       0         -1             0  \n",
      "8       7.2450   28.98    None       0         -1             0  \n",
      "9      12.5000   50.00    None       0         -1             0  \n",
      "10      5.0000    0.00    None       0          1             0  \n",
      "11      6.3325    0.00    None       0          1             0  \n",
      "12      5.0000    0.00    None       0          1             0  \n",
      "13      6.2775    0.00    None       0          1             0  \n",
      "14      5.0000    0.00    None       0          1             0  \n",
      "15     25.3000  101.20    None       0         -1             0  \n",
      "16     15.1650   60.66    None       0         -1             0  \n",
      "17      6.2550    0.00    None       0          1             0  \n",
      "18      5.0000    0.00    None       0          1             0  \n",
      "19     31.4500  125.80    None       0         -1             0  \n",
      "20     18.3400   73.36    None       0         -1             0  \n",
      "21      6.3550    0.00    None       0          1             0  \n",
      "22     17.9375   71.75    None       0         -1             0  \n",
      "23      6.2425    0.00    None       0          1             0  \n",
      "24      5.0000    0.00    None       0          1             0  \n",
      "25      6.4400    0.00    None       0          1             0  \n",
      "26     20.6800   82.72    None       0         -1             0  \n",
      "27     51.3000  205.20    None       0         -1             0  \n",
      "28     20.5600   82.24    None       0         -1             0  \n",
      "29     50.8000  203.20    None       0         -1             0  \n",
      "30     20.7000   82.80    None       0         -1             0  \n",
      "31      6.3275    0.00    None       0          1             0  \n",
      "32     21.0400   84.16    None       0         -1             0  \n",
      "33     57.1725  228.69    None       0         -1             0  \n",
      "34      5.0000    0.00    None       0          1             0  \n",
      "35      6.5250    0.00    None       0          1             0  \n",
      "36     24.6150   98.46    None       0         -1             0  \n",
      "37      6.5150    0.00    None       0          1             0  \n",
      "38      5.0000    0.00    None       0          1             0  \n",
      "39     73.9200  295.68    None       0         -1             0  \n",
      "40     27.3750  109.50    None       0         -1             0  \n"
     ]
    },
    {
     "name": "stdin",
     "output_type": "stream",
     "text": [
      " \n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "open      2.670000e+01\n",
      "high      2.782000e+01\n",
      "low       2.663000e+01\n",
      "close     2.721000e+01\n",
      "volume    5.923030e+05\n",
      "amount    1.615187e+09\n",
      "Name: (2019-01-30 00:00:00, 000002), dtype: float64\n",
      "---------------under is 当前全市场的market_data --------------\n",
      "                    open   high    low  close    volume        amount\n",
      "2019-01-30 000001  10.95  11.18  10.86  10.95  712001.0  7.852045e+08\n",
      "           000002  26.70  27.82  26.63  27.21  592303.0  1.615187e+09\n",
      "---------------under is 当前品种的market_data --------------\n",
      "                    open   high    low  close    volume        amount\n",
      "2019-01-02 000002  23.83  24.09  23.67  23.90  247010.0  5.893846e+08\n",
      "2019-01-03 000002  23.79  24.50  23.71  24.07  222353.0  5.363333e+08\n",
      "2019-01-04 000002  23.91  25.00  23.85  24.93  377727.0  9.270117e+08\n",
      "2019-01-07 000002  25.29  25.53  24.99  25.05  427154.0  1.077909e+09\n",
      "2019-01-08 000002  25.05  25.20  24.63  25.00  214382.0  5.336044e+08\n",
      "2019-01-09 000002  25.40  25.88  25.11  25.33  340140.0  8.670814e+08\n",
      "2019-01-10 000002  25.22  25.56  25.03  25.11  224649.0  5.689526e+08\n",
      "2019-01-11 000002  25.10  25.54  25.01  25.30  240694.0  6.069947e+08\n",
      "2019-01-14 000002  25.13  25.30  24.92  25.02  183281.0  4.591518e+08\n",
      "2019-01-15 000002  25.00  25.16  24.32  25.16  368758.0  9.149835e+08\n",
      "2019-01-16 000002  25.15  25.50  24.83  25.42  267466.0  6.766856e+08\n",
      "2019-01-17 000002  25.50  25.50  24.94  24.97  245895.0  6.188767e+08\n",
      "2019-01-18 000002  25.00  25.76  24.99  25.76  365723.0  9.334642e+08\n",
      "2019-01-21 000002  25.71  25.95  25.40  25.65  255499.0  6.558207e+08\n",
      "2019-01-22 000002  25.50  26.17  25.23  25.40  379336.0  9.748227e+08\n",
      "2019-01-23 000002  25.35  25.49  25.20  25.31  146847.0  3.718901e+08\n",
      "2019-01-24 000002  25.42  25.54  24.93  25.41  234931.0  5.928229e+08\n",
      "2019-01-25 000002  25.51  26.35  25.49  26.10  451756.0  1.176480e+09\n",
      "2019-01-28 000002  26.20  26.62  25.86  26.06  308906.0  8.102888e+08\n",
      "2019-01-29 000002  25.91  26.88  25.87  26.88  368071.0  9.742794e+08\n",
      "2019-01-30 000002  26.70  27.82  26.63  27.21  592303.0  1.615187e+09\n",
      "000002\n",
      "---------------under is 账户情况和持仓情况 -------------------\n",
      "{'code': '000002', 'instrument_id': '000002', 'user_id': 'x', 'portfolio_cookie': 'default', 'username': 'quantaxis', 'position_id': '5aa694d0-3861-43a8-9efc-84f380138bea', 'account_cookie': 'x', 'frozen': {}, 'name': None, 'spms_id': None, 'oms_id': None, 'market_type': 'stock_cn', 'exchange_id': None, 'moneypreset': 100000, 'moneypresetLeft': 100000, 'lastupdatetime': '', 'volume_long_today': 12000, 'volume_long_his': 0, 'volume_long': 12000, 'volume_short_today': 0, 'volume_short_his': 0, 'volume_short': 0, 'volume_long_frozen_today': 0, 'volume_long_frozen_his': 0, 'volume_long_frozen': 0, 'volume_short_frozen_today': 0, 'volume_short_frozen_his': 0, 'volume_short_frozen': 0, 'margin_long': 305120.0, 'margin_short': 0, 'margin': 305120.0, 'position_price_long': 25.426666666666666, 'position_cost_long': 305120.0, 'position_price_short': 0, 'position_cost_short': 0, 'open_price_long': 25.426666666666666, 'open_cost_long': 305120.0, 'open_price_short': 0, 'open_cost_short': 0, 'trades': [], 'orders': {}, 'last_price': 27.21, 'float_profit_long': 21400.0, 'float_profit_short': 0.0, 'float_profit': 21400.0, 'position_profit_long': 21400.0, 'position_profit_short': 0.0, 'position_profit': 21400.0}\n",
      "               datetime    code  price  amount          cash  \\\n",
      "0   2019-01-02 00:00:00  000001   9.19    1000  9.908050e+05   \n",
      "1   2019-01-02 00:00:00  000002  23.90    1000  9.668990e+05   \n",
      "2   2019-01-03 00:00:00  000001   9.28    1000  9.576140e+05   \n",
      "3   2019-01-03 00:00:00  000002  24.07   -1000  9.816539e+05   \n",
      "4   2019-01-04 00:00:00  000001   9.75   -2000  1.001129e+06   \n",
      "5   2019-01-04 00:00:00  000002  24.93    1000  9.761932e+05   \n",
      "6   2019-01-07 00:00:00  000001   9.74    1000  9.664482e+05   \n",
      "7   2019-01-07 00:00:00  000002  25.05   -2000  1.016486e+06   \n",
      "8   2019-01-08 00:00:00  000001   9.66   -3000  1.045429e+06   \n",
      "9   2019-01-08 00:00:00  000002  25.00   -2000  1.095367e+06   \n",
      "10  2019-01-09 00:00:00  000001   9.94    1000  1.085422e+06   \n",
      "11  2019-01-09 00:00:00  000002  25.33    1000  1.060086e+06   \n",
      "12  2019-01-10 00:00:00  000001  10.10    1000  1.049981e+06   \n",
      "13  2019-01-10 00:00:00  000002  25.11    1000  1.024864e+06   \n",
      "14  2019-01-11 00:00:00  000001  10.20    1000  1.014659e+06   \n",
      "15  2019-01-11 00:00:00  000002  25.30   -4000  1.115733e+06   \n",
      "16  2019-01-14 00:00:00  000001  10.11   -6000  1.176317e+06   \n",
      "17  2019-01-14 00:00:00  000002  25.02    1000  1.151291e+06   \n",
      "18  2019-01-15 00:00:00  000001  10.24    1000  1.141046e+06   \n",
      "19  2019-01-15 00:00:00  000002  25.16   -5000  1.266688e+06   \n",
      "20  2019-01-16 00:00:00  000001  10.48   -7000  1.339957e+06   \n",
      "21  2019-01-16 00:00:00  000002  25.42    1000  1.314530e+06   \n",
      "22  2019-01-17 00:00:00  000001  10.25   -7000  1.386191e+06   \n",
      "23  2019-01-17 00:00:00  000002  24.97    1000  1.361214e+06   \n",
      "24  2019-01-18 00:00:00  000001  10.43    1000  1.350779e+06   \n",
      "25  2019-01-18 00:00:00  000002  25.76    1000  1.325013e+06   \n",
      "26  2019-01-21 00:00:00  000001  10.34   -8000  1.407630e+06   \n",
      "27  2019-01-21 00:00:00  000002  25.65   -8000  1.612573e+06   \n",
      "28  2019-01-22 00:00:00  000001  10.28   -8000  1.694710e+06   \n",
      "29  2019-01-22 00:00:00  000002  25.40   -8000  1.897656e+06   \n",
      "30  2019-01-23 00:00:00  000001  10.35   -8000  1.980353e+06   \n",
      "31  2019-01-23 00:00:00  000002  25.31    1000  1.955036e+06   \n",
      "32  2019-01-24 00:00:00  000001  10.52   -8000  2.039091e+06   \n",
      "33  2019-01-24 00:00:00  000002  25.41   -9000  2.267495e+06   \n",
      "34  2019-01-25 00:00:00  000001  11.00    1000  2.256490e+06   \n",
      "35  2019-01-25 00:00:00  000002  26.10    1000  2.230384e+06   \n",
      "36  2019-01-28 00:00:00  000001  10.94   -9000  2.328721e+06   \n",
      "37  2019-01-28 00:00:00  000002  26.06    1000  2.302654e+06   \n",
      "38  2019-01-29 00:00:00  000001  11.00    1000  2.291649e+06   \n",
      "39  2019-01-29 00:00:00  000002  26.88  -11000  2.586960e+06   \n",
      "40  2019-01-30 00:00:00  000001  10.95  -10000  2.696323e+06   \n",
      "41  2019-01-30 00:00:00  000002  27.21    1000  2.669106e+06   \n",
      "\n",
      "                                order_id realorder_id trade_id account_cookie  \\\n",
      "0   e23f9e01-e8d2-4a05-93ef-9163ce7a83ee         None     None              x   \n",
      "1   1f430faa-86d1-440b-abf7-a7feddc17954         None     None              x   \n",
      "2   0230d608-91cc-422e-8deb-218f4faef3d7         None     None              x   \n",
      "3   427f1eed-b3bd-4078-94e3-156bf3ae21a6         None     None              x   \n",
      "4   48fd88b8-e3c0-4df5-94ef-62b936345bd9         None     None              x   \n",
      "5   d9aff179-9bc3-4268-b2d5-37eee8de309f         None     None              x   \n",
      "6   41f23955-b920-4f04-bcb7-ca1cd960aa45         None     None              x   \n",
      "7   cb2fdd74-7326-41d9-812f-9d88da447741         None     None              x   \n",
      "8   8ef82ee7-87b8-4f7d-8a01-374f52b60cbb         None     None              x   \n",
      "9   1f63fa52-f56b-4814-8eb3-5e4de849f3cb         None     None              x   \n",
      "10  13e77d45-9e2c-4ef3-89f5-7fa63cc3b808         None     None              x   \n",
      "11  7e714c35-83a4-4cb4-8ab5-d4fb2b31ccb7         None     None              x   \n",
      "12  380f932e-7871-4c72-94d3-5077861c9f53         None     None              x   \n",
      "13  3966e418-9017-4565-b24f-ed9455ef5593         None     None              x   \n",
      "14  99048106-f032-45a2-92c6-5a076f899a8a         None     None              x   \n",
      "15  3529f52a-3c09-46fc-944d-b3c619af7cd7         None     None              x   \n",
      "16  650c29d4-459c-412a-8000-c881af3c662a         None     None              x   \n",
      "17  9d0b7e50-53ac-42df-9175-c3f303387629         None     None              x   \n",
      "18  80ac049d-602e-44ff-a799-3be84acdfe55         None     None              x   \n",
      "19  e354ff47-4298-4d5a-a22e-794e327dee61         None     None              x   \n",
      "20  4977e6e3-e6ee-4d8c-8c43-9b1f027e07b1         None     None              x   \n",
      "21  16d8792c-b2f0-400d-b2a6-aa5c2e473728         None     None              x   \n",
      "22  eff96ddf-6dbb-4af3-a7bd-1f170e632dbc         None     None              x   \n",
      "23  7b21c653-d1d1-44d8-9772-790585915ae4         None     None              x   \n",
      "24  dfe8fbac-ff27-4746-a53a-f6220f3c63a6         None     None              x   \n",
      "25  98e05d3a-cdf5-4cac-bd41-fa747e29a2a4         None     None              x   \n",
      "26  23cd8f74-342a-4796-aeeb-07441bed75e1         None     None              x   \n",
      "27  3f7dad60-3de4-4ca9-ba5e-af87d33594e6         None     None              x   \n",
      "28  f2b9cae9-b1d9-4a00-ba62-ce81baec3d72         None     None              x   \n",
      "29  de5fce65-5a39-42c6-8d6e-914060c5f971         None     None              x   \n",
      "30  3d763d03-c042-4312-a7e3-ffae8fb877b4         None     None              x   \n",
      "31  d41375b6-70c1-4b71-9eab-0ae5f1763fd2         None     None              x   \n",
      "32  3fc5cbfd-354e-4f68-9248-a0853a763435         None     None              x   \n",
      "33  2b065a3c-e510-4f64-ab30-c94a93a0dc51         None     None              x   \n",
      "34  3c140a72-da07-443f-9386-04440fecb9a4         None     None              x   \n",
      "35  0002bf5f-e6ec-433b-b8bd-841e76c93483         None     None              x   \n",
      "36  306a25f0-fc21-4eee-b0bb-9d5a0a57694d         None     None              x   \n",
      "37  a4d75c37-d330-4400-9298-f19665f0043e         None     None              x   \n",
      "38  4ea50c6e-dc9a-4372-a9a5-86ce216c2199         None     None              x   \n",
      "39  9ca9217d-a510-4344-8def-9be6e67ab42f         None     None              x   \n",
      "40  a577bff0-f7d2-4b60-a31c-bcee0cf7dc8f         None     None              x   \n",
      "41  b0a91950-bcc3-4a3e-89d2-eaf5258d4c0c         None     None              x   \n",
      "\n",
      "    commission     tax message  frozen  direction  total_frozen  \n",
      "0       5.0000    0.00    None       0          1             0  \n",
      "1       5.9750    0.00    None       0          1             0  \n",
      "2       5.0000    0.00    None       0          1             0  \n",
      "3       6.0175   24.07    None       0         -1             0  \n",
      "4       5.0000   19.50    None       0         -1             0  \n",
      "5       6.2325    0.00    None       0          1             0  \n",
      "6       5.0000    0.00    None       0          1             0  \n",
      "7      12.5250   50.10    None       0         -1             0  \n",
      "8       7.2450   28.98    None       0         -1             0  \n",
      "9      12.5000   50.00    None       0         -1             0  \n",
      "10      5.0000    0.00    None       0          1             0  \n",
      "11      6.3325    0.00    None       0          1             0  \n",
      "12      5.0000    0.00    None       0          1             0  \n",
      "13      6.2775    0.00    None       0          1             0  \n",
      "14      5.0000    0.00    None       0          1             0  \n",
      "15     25.3000  101.20    None       0         -1             0  \n",
      "16     15.1650   60.66    None       0         -1             0  \n",
      "17      6.2550    0.00    None       0          1             0  \n",
      "18      5.0000    0.00    None       0          1             0  \n",
      "19     31.4500  125.80    None       0         -1             0  \n",
      "20     18.3400   73.36    None       0         -1             0  \n",
      "21      6.3550    0.00    None       0          1             0  \n",
      "22     17.9375   71.75    None       0         -1             0  \n",
      "23      6.2425    0.00    None       0          1             0  \n",
      "24      5.0000    0.00    None       0          1             0  \n",
      "25      6.4400    0.00    None       0          1             0  \n",
      "26     20.6800   82.72    None       0         -1             0  \n",
      "27     51.3000  205.20    None       0         -1             0  \n",
      "28     20.5600   82.24    None       0         -1             0  \n",
      "29     50.8000  203.20    None       0         -1             0  \n",
      "30     20.7000   82.80    None       0         -1             0  \n",
      "31      6.3275    0.00    None       0          1             0  \n",
      "32     21.0400   84.16    None       0         -1             0  \n",
      "33     57.1725  228.69    None       0         -1             0  \n",
      "34      5.0000    0.00    None       0          1             0  \n",
      "35      6.5250    0.00    None       0          1             0  \n",
      "36     24.6150   98.46    None       0         -1             0  \n",
      "37      6.5150    0.00    None       0          1             0  \n",
      "38      5.0000    0.00    None       0          1             0  \n",
      "39     73.9200  295.68    None       0         -1             0  \n",
      "40     27.3750  109.50    None       0         -1             0  \n",
      "41      6.8025    0.00    None       0          1             0  \n"
     ]
    },
    {
     "name": "stdin",
     "output_type": "stream",
     "text": [
      " \n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "backtest: Settle!\n",
      "open      1.098000e+01\n",
      "high      1.120000e+01\n",
      "low       1.094000e+01\n",
      "close     1.110000e+01\n",
      "volume    8.316220e+05\n",
      "amount    9.226029e+08\n",
      "Name: (2019-01-31 00:00:00, 000001), dtype: float64\n",
      "---------------under is 当前全市场的market_data --------------\n",
      "                    open  high    low  close    volume       amount\n",
      "2019-01-31 000001  10.98  11.2  10.94   11.1  831622.0  922602880.0\n",
      "---------------under is 当前品种的market_data --------------\n",
      "                    open   high    low  close     volume        amount\n",
      "2019-01-02 000001   9.39   9.42   9.16   9.19   539386.0  4.986951e+08\n",
      "2019-01-03 000001   9.18   9.33   9.15   9.28   415537.0  3.844577e+08\n",
      "2019-01-04 000001   9.24   9.82   9.22   9.75  1481159.0  1.422150e+09\n",
      "2019-01-07 000001   9.84   9.85   9.63   9.74   865687.0  8.411664e+08\n",
      "2019-01-08 000001   9.73   9.74   9.62   9.66   402388.0  3.892478e+08\n",
      "2019-01-09 000001   9.74  10.08   9.70   9.94  1233486.0  1.229465e+09\n",
      "2019-01-10 000001   9.87  10.20   9.86  10.10  1071817.0  1.079711e+09\n",
      "2019-01-11 000001  10.11  10.22  10.05  10.20   696364.0  7.080018e+08\n",
      "2019-01-14 000001  10.22  10.25  10.07  10.11   500443.0  5.078629e+08\n",
      "2019-01-15 000001  10.11  10.28  10.09  10.24   542160.0  5.530273e+08\n",
      "2019-01-16 000001  10.24  10.50  10.23  10.48   977699.0  1.017495e+09\n",
      "2019-01-17 000001  10.54  10.57  10.17  10.25   882811.0  9.102121e+08\n",
      "2019-01-18 000001  10.34  10.49  10.28  10.43   738793.0  7.699736e+08\n",
      "2019-01-21 000001  10.34  10.47  10.32  10.34   659355.0  6.844657e+08\n",
      "2019-01-22 000001  10.34  10.44  10.26  10.28   424413.0  4.389915e+08\n",
      "2019-01-23 000001  10.29  10.47  10.29  10.35   537876.0  5.593844e+08\n",
      "2019-01-24 000001  10.40  10.55  10.37  10.52   679240.0  7.114957e+08\n",
      "2019-01-25 000001  10.56  11.04  10.55  11.00  2108362.0  2.299718e+09\n",
      "2019-01-28 000001  11.04  11.14  10.88  10.94  1035909.0  1.141854e+09\n",
      "2019-01-29 000001  10.96  11.07  10.77  11.00   826631.0  9.048479e+08\n",
      "2019-01-30 000001  10.95  11.18  10.86  10.95   712001.0  7.852045e+08\n",
      "2019-01-31 000001  10.98  11.20  10.94  11.10   831622.0  9.226029e+08\n",
      "000001\n",
      "---------------under is 账户情况和持仓情况 -------------------\n",
      "{'code': '000001', 'instrument_id': '000001', 'user_id': 'x', 'portfolio_cookie': 'default', 'username': 'quantaxis', 'position_id': 'd2b24d5c-fb1e-4a2e-97eb-f19b04f544ec', 'account_cookie': 'x', 'frozen': {}, 'name': None, 'spms_id': None, 'oms_id': None, 'market_type': 'stock_cn', 'exchange_id': None, 'moneypreset': 100000, 'moneypresetLeft': 100000, 'lastupdatetime': '', 'volume_long_today': 11000, 'volume_long_his': 0, 'volume_long': 11000, 'volume_short_today': 0, 'volume_short_his': 0, 'volume_short': 0, 'volume_long_frozen_today': 0, 'volume_long_frozen_his': 0, 'volume_long_frozen': 0, 'volume_short_frozen_today': 0, 'volume_short_frozen_his': 0, 'volume_short_frozen': 0, 'margin_long': 112220.0, 'margin_short': 0, 'margin': 112220.0, 'position_price_long': 10.201818181818181, 'position_cost_long': 112220.0, 'position_price_short': 0, 'position_cost_short': 0, 'open_price_long': 10.201818181818181, 'open_cost_long': 112220.0, 'open_price_short': 0, 'open_cost_short': 0, 'trades': [], 'orders': {}, 'last_price': 11.1, 'float_profit_long': 9880.0, 'float_profit_short': 0.0, 'float_profit': 9880.0, 'position_profit_long': 9880.0, 'position_profit_short': 0.0, 'position_profit': 9880.0}\n",
      "               datetime    code  price  amount          cash  \\\n",
      "0   2019-01-02 00:00:00  000001   9.19    1000  9.908050e+05   \n",
      "1   2019-01-02 00:00:00  000002  23.90    1000  9.668990e+05   \n",
      "2   2019-01-03 00:00:00  000001   9.28    1000  9.576140e+05   \n",
      "3   2019-01-03 00:00:00  000002  24.07   -1000  9.816539e+05   \n",
      "4   2019-01-04 00:00:00  000001   9.75   -2000  1.001129e+06   \n",
      "5   2019-01-04 00:00:00  000002  24.93    1000  9.761932e+05   \n",
      "6   2019-01-07 00:00:00  000001   9.74    1000  9.664482e+05   \n",
      "7   2019-01-07 00:00:00  000002  25.05   -2000  1.016486e+06   \n",
      "8   2019-01-08 00:00:00  000001   9.66   -3000  1.045429e+06   \n",
      "9   2019-01-08 00:00:00  000002  25.00   -2000  1.095367e+06   \n",
      "10  2019-01-09 00:00:00  000001   9.94    1000  1.085422e+06   \n",
      "11  2019-01-09 00:00:00  000002  25.33    1000  1.060086e+06   \n",
      "12  2019-01-10 00:00:00  000001  10.10    1000  1.049981e+06   \n",
      "13  2019-01-10 00:00:00  000002  25.11    1000  1.024864e+06   \n",
      "14  2019-01-11 00:00:00  000001  10.20    1000  1.014659e+06   \n",
      "15  2019-01-11 00:00:00  000002  25.30   -4000  1.115733e+06   \n",
      "16  2019-01-14 00:00:00  000001  10.11   -6000  1.176317e+06   \n",
      "17  2019-01-14 00:00:00  000002  25.02    1000  1.151291e+06   \n",
      "18  2019-01-15 00:00:00  000001  10.24    1000  1.141046e+06   \n",
      "19  2019-01-15 00:00:00  000002  25.16   -5000  1.266688e+06   \n",
      "20  2019-01-16 00:00:00  000001  10.48   -7000  1.339957e+06   \n",
      "21  2019-01-16 00:00:00  000002  25.42    1000  1.314530e+06   \n",
      "22  2019-01-17 00:00:00  000001  10.25   -7000  1.386191e+06   \n",
      "23  2019-01-17 00:00:00  000002  24.97    1000  1.361214e+06   \n",
      "24  2019-01-18 00:00:00  000001  10.43    1000  1.350779e+06   \n",
      "25  2019-01-18 00:00:00  000002  25.76    1000  1.325013e+06   \n",
      "26  2019-01-21 00:00:00  000001  10.34   -8000  1.407630e+06   \n",
      "27  2019-01-21 00:00:00  000002  25.65   -8000  1.612573e+06   \n",
      "28  2019-01-22 00:00:00  000001  10.28   -8000  1.694710e+06   \n",
      "29  2019-01-22 00:00:00  000002  25.40   -8000  1.897656e+06   \n",
      "30  2019-01-23 00:00:00  000001  10.35   -8000  1.980353e+06   \n",
      "31  2019-01-23 00:00:00  000002  25.31    1000  1.955036e+06   \n",
      "32  2019-01-24 00:00:00  000001  10.52   -8000  2.039091e+06   \n",
      "33  2019-01-24 00:00:00  000002  25.41   -9000  2.267495e+06   \n",
      "34  2019-01-25 00:00:00  000001  11.00    1000  2.256490e+06   \n",
      "35  2019-01-25 00:00:00  000002  26.10    1000  2.230384e+06   \n",
      "36  2019-01-28 00:00:00  000001  10.94   -9000  2.328721e+06   \n",
      "37  2019-01-28 00:00:00  000002  26.06    1000  2.302654e+06   \n",
      "38  2019-01-29 00:00:00  000001  11.00    1000  2.291649e+06   \n",
      "39  2019-01-29 00:00:00  000002  26.88  -11000  2.586960e+06   \n",
      "40  2019-01-30 00:00:00  000001  10.95  -10000  2.696323e+06   \n",
      "41  2019-01-30 00:00:00  000002  27.21    1000  2.669106e+06   \n",
      "42  2019-01-31 00:00:00  000001  11.10    1000  2.658001e+06   \n",
      "\n",
      "                                order_id realorder_id trade_id account_cookie  \\\n",
      "0   e23f9e01-e8d2-4a05-93ef-9163ce7a83ee         None     None              x   \n",
      "1   1f430faa-86d1-440b-abf7-a7feddc17954         None     None              x   \n",
      "2   0230d608-91cc-422e-8deb-218f4faef3d7         None     None              x   \n",
      "3   427f1eed-b3bd-4078-94e3-156bf3ae21a6         None     None              x   \n",
      "4   48fd88b8-e3c0-4df5-94ef-62b936345bd9         None     None              x   \n",
      "5   d9aff179-9bc3-4268-b2d5-37eee8de309f         None     None              x   \n",
      "6   41f23955-b920-4f04-bcb7-ca1cd960aa45         None     None              x   \n",
      "7   cb2fdd74-7326-41d9-812f-9d88da447741         None     None              x   \n",
      "8   8ef82ee7-87b8-4f7d-8a01-374f52b60cbb         None     None              x   \n",
      "9   1f63fa52-f56b-4814-8eb3-5e4de849f3cb         None     None              x   \n",
      "10  13e77d45-9e2c-4ef3-89f5-7fa63cc3b808         None     None              x   \n",
      "11  7e714c35-83a4-4cb4-8ab5-d4fb2b31ccb7         None     None              x   \n",
      "12  380f932e-7871-4c72-94d3-5077861c9f53         None     None              x   \n",
      "13  3966e418-9017-4565-b24f-ed9455ef5593         None     None              x   \n",
      "14  99048106-f032-45a2-92c6-5a076f899a8a         None     None              x   \n",
      "15  3529f52a-3c09-46fc-944d-b3c619af7cd7         None     None              x   \n",
      "16  650c29d4-459c-412a-8000-c881af3c662a         None     None              x   \n",
      "17  9d0b7e50-53ac-42df-9175-c3f303387629         None     None              x   \n",
      "18  80ac049d-602e-44ff-a799-3be84acdfe55         None     None              x   \n",
      "19  e354ff47-4298-4d5a-a22e-794e327dee61         None     None              x   \n",
      "20  4977e6e3-e6ee-4d8c-8c43-9b1f027e07b1         None     None              x   \n",
      "21  16d8792c-b2f0-400d-b2a6-aa5c2e473728         None     None              x   \n",
      "22  eff96ddf-6dbb-4af3-a7bd-1f170e632dbc         None     None              x   \n",
      "23  7b21c653-d1d1-44d8-9772-790585915ae4         None     None              x   \n",
      "24  dfe8fbac-ff27-4746-a53a-f6220f3c63a6         None     None              x   \n",
      "25  98e05d3a-cdf5-4cac-bd41-fa747e29a2a4         None     None              x   \n",
      "26  23cd8f74-342a-4796-aeeb-07441bed75e1         None     None              x   \n",
      "27  3f7dad60-3de4-4ca9-ba5e-af87d33594e6         None     None              x   \n",
      "28  f2b9cae9-b1d9-4a00-ba62-ce81baec3d72         None     None              x   \n",
      "29  de5fce65-5a39-42c6-8d6e-914060c5f971         None     None              x   \n",
      "30  3d763d03-c042-4312-a7e3-ffae8fb877b4         None     None              x   \n",
      "31  d41375b6-70c1-4b71-9eab-0ae5f1763fd2         None     None              x   \n",
      "32  3fc5cbfd-354e-4f68-9248-a0853a763435         None     None              x   \n",
      "33  2b065a3c-e510-4f64-ab30-c94a93a0dc51         None     None              x   \n",
      "34  3c140a72-da07-443f-9386-04440fecb9a4         None     None              x   \n",
      "35  0002bf5f-e6ec-433b-b8bd-841e76c93483         None     None              x   \n",
      "36  306a25f0-fc21-4eee-b0bb-9d5a0a57694d         None     None              x   \n",
      "37  a4d75c37-d330-4400-9298-f19665f0043e         None     None              x   \n",
      "38  4ea50c6e-dc9a-4372-a9a5-86ce216c2199         None     None              x   \n",
      "39  9ca9217d-a510-4344-8def-9be6e67ab42f         None     None              x   \n",
      "40  a577bff0-f7d2-4b60-a31c-bcee0cf7dc8f         None     None              x   \n",
      "41  b0a91950-bcc3-4a3e-89d2-eaf5258d4c0c         None     None              x   \n",
      "42  da320f16-b546-4972-891d-5ce1fc4e1ac7         None     None              x   \n",
      "\n",
      "    commission     tax message  frozen  direction  total_frozen  \n",
      "0       5.0000    0.00    None       0          1             0  \n",
      "1       5.9750    0.00    None       0          1             0  \n",
      "2       5.0000    0.00    None       0          1             0  \n",
      "3       6.0175   24.07    None       0         -1             0  \n",
      "4       5.0000   19.50    None       0         -1             0  \n",
      "5       6.2325    0.00    None       0          1             0  \n",
      "6       5.0000    0.00    None       0          1             0  \n",
      "7      12.5250   50.10    None       0         -1             0  \n",
      "8       7.2450   28.98    None       0         -1             0  \n",
      "9      12.5000   50.00    None       0         -1             0  \n",
      "10      5.0000    0.00    None       0          1             0  \n",
      "11      6.3325    0.00    None       0          1             0  \n",
      "12      5.0000    0.00    None       0          1             0  \n",
      "13      6.2775    0.00    None       0          1             0  \n",
      "14      5.0000    0.00    None       0          1             0  \n",
      "15     25.3000  101.20    None       0         -1             0  \n",
      "16     15.1650   60.66    None       0         -1             0  \n",
      "17      6.2550    0.00    None       0          1             0  \n",
      "18      5.0000    0.00    None       0          1             0  \n",
      "19     31.4500  125.80    None       0         -1             0  \n",
      "20     18.3400   73.36    None       0         -1             0  \n",
      "21      6.3550    0.00    None       0          1             0  \n",
      "22     17.9375   71.75    None       0         -1             0  \n",
      "23      6.2425    0.00    None       0          1             0  \n",
      "24      5.0000    0.00    None       0          1             0  \n",
      "25      6.4400    0.00    None       0          1             0  \n",
      "26     20.6800   82.72    None       0         -1             0  \n",
      "27     51.3000  205.20    None       0         -1             0  \n",
      "28     20.5600   82.24    None       0         -1             0  \n",
      "29     50.8000  203.20    None       0         -1             0  \n",
      "30     20.7000   82.80    None       0         -1             0  \n",
      "31      6.3275    0.00    None       0          1             0  \n",
      "32     21.0400   84.16    None       0         -1             0  \n",
      "33     57.1725  228.69    None       0         -1             0  \n",
      "34      5.0000    0.00    None       0          1             0  \n",
      "35      6.5250    0.00    None       0          1             0  \n",
      "36     24.6150   98.46    None       0         -1             0  \n",
      "37      6.5150    0.00    None       0          1             0  \n",
      "38      5.0000    0.00    None       0          1             0  \n",
      "39     73.9200  295.68    None       0         -1             0  \n",
      "40     27.3750  109.50    None       0         -1             0  \n",
      "41      6.8025    0.00    None       0          1             0  \n",
      "42      5.0000    0.00    None       0          1             0  \n"
     ]
    },
    {
     "name": "stdin",
     "output_type": "stream",
     "text": [
      " \n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "open      2.739000e+01\n",
      "high      2.815000e+01\n",
      "low       2.700000e+01\n",
      "close     2.775000e+01\n",
      "volume    4.118570e+05\n",
      "amount    1.138512e+09\n",
      "Name: (2019-01-31 00:00:00, 000002), dtype: float64\n",
      "---------------under is 当前全市场的market_data --------------\n",
      "                    open   high    low  close    volume        amount\n",
      "2019-01-31 000001  10.98  11.20  10.94  11.10  831622.0  9.226029e+08\n",
      "           000002  27.39  28.15  27.00  27.75  411857.0  1.138512e+09\n",
      "---------------under is 当前品种的market_data --------------\n",
      "                    open   high    low  close    volume        amount\n",
      "2019-01-02 000002  23.83  24.09  23.67  23.90  247010.0  5.893846e+08\n",
      "2019-01-03 000002  23.79  24.50  23.71  24.07  222353.0  5.363333e+08\n",
      "2019-01-04 000002  23.91  25.00  23.85  24.93  377727.0  9.270117e+08\n",
      "2019-01-07 000002  25.29  25.53  24.99  25.05  427154.0  1.077909e+09\n",
      "2019-01-08 000002  25.05  25.20  24.63  25.00  214382.0  5.336044e+08\n",
      "2019-01-09 000002  25.40  25.88  25.11  25.33  340140.0  8.670814e+08\n",
      "2019-01-10 000002  25.22  25.56  25.03  25.11  224649.0  5.689526e+08\n",
      "2019-01-11 000002  25.10  25.54  25.01  25.30  240694.0  6.069947e+08\n",
      "2019-01-14 000002  25.13  25.30  24.92  25.02  183281.0  4.591518e+08\n",
      "2019-01-15 000002  25.00  25.16  24.32  25.16  368758.0  9.149835e+08\n",
      "2019-01-16 000002  25.15  25.50  24.83  25.42  267466.0  6.766856e+08\n",
      "2019-01-17 000002  25.50  25.50  24.94  24.97  245895.0  6.188767e+08\n",
      "2019-01-18 000002  25.00  25.76  24.99  25.76  365723.0  9.334642e+08\n",
      "2019-01-21 000002  25.71  25.95  25.40  25.65  255499.0  6.558207e+08\n",
      "2019-01-22 000002  25.50  26.17  25.23  25.40  379336.0  9.748227e+08\n",
      "2019-01-23 000002  25.35  25.49  25.20  25.31  146847.0  3.718901e+08\n",
      "2019-01-24 000002  25.42  25.54  24.93  25.41  234931.0  5.928229e+08\n",
      "2019-01-25 000002  25.51  26.35  25.49  26.10  451756.0  1.176480e+09\n",
      "2019-01-28 000002  26.20  26.62  25.86  26.06  308906.0  8.102888e+08\n",
      "2019-01-29 000002  25.91  26.88  25.87  26.88  368071.0  9.742794e+08\n",
      "2019-01-30 000002  26.70  27.82  26.63  27.21  592303.0  1.615187e+09\n",
      "2019-01-31 000002  27.39  28.15  27.00  27.75  411857.0  1.138512e+09\n",
      "000002\n",
      "---------------under is 账户情况和持仓情况 -------------------\n",
      "{'code': '000002', 'instrument_id': '000002', 'user_id': 'x', 'portfolio_cookie': 'default', 'username': 'quantaxis', 'position_id': '5aa694d0-3861-43a8-9efc-84f380138bea', 'account_cookie': 'x', 'frozen': {}, 'name': None, 'spms_id': None, 'oms_id': None, 'market_type': 'stock_cn', 'exchange_id': None, 'moneypreset': 100000, 'moneypresetLeft': 100000, 'lastupdatetime': '', 'volume_long_today': 13000, 'volume_long_his': 0, 'volume_long': 13000, 'volume_short_today': 0, 'volume_short_his': 0, 'volume_short': 0, 'volume_long_frozen_today': 0, 'volume_long_frozen_his': 0, 'volume_long_frozen': 0, 'volume_short_frozen_today': 0, 'volume_short_frozen_his': 0, 'volume_short_frozen': 0, 'margin_long': 332870.0, 'margin_short': 0, 'margin': 332870.0, 'position_price_long': 25.605384615384615, 'position_cost_long': 332870.0, 'position_price_short': 0, 'position_cost_short': 0, 'open_price_long': 25.605384615384615, 'open_cost_long': 332870.0, 'open_price_short': 0, 'open_cost_short': 0, 'trades': [], 'orders': {}, 'last_price': 27.75, 'float_profit_long': 27880.0, 'float_profit_short': 0.0, 'float_profit': 27880.0, 'position_profit_long': 27880.0, 'position_profit_short': 0.0, 'position_profit': 27880.0}\n",
      "               datetime    code  price  amount          cash  \\\n",
      "0   2019-01-02 00:00:00  000001   9.19    1000  9.908050e+05   \n",
      "1   2019-01-02 00:00:00  000002  23.90    1000  9.668990e+05   \n",
      "2   2019-01-03 00:00:00  000001   9.28    1000  9.576140e+05   \n",
      "3   2019-01-03 00:00:00  000002  24.07   -1000  9.816539e+05   \n",
      "4   2019-01-04 00:00:00  000001   9.75   -2000  1.001129e+06   \n",
      "5   2019-01-04 00:00:00  000002  24.93    1000  9.761932e+05   \n",
      "6   2019-01-07 00:00:00  000001   9.74    1000  9.664482e+05   \n",
      "7   2019-01-07 00:00:00  000002  25.05   -2000  1.016486e+06   \n",
      "8   2019-01-08 00:00:00  000001   9.66   -3000  1.045429e+06   \n",
      "9   2019-01-08 00:00:00  000002  25.00   -2000  1.095367e+06   \n",
      "10  2019-01-09 00:00:00  000001   9.94    1000  1.085422e+06   \n",
      "11  2019-01-09 00:00:00  000002  25.33    1000  1.060086e+06   \n",
      "12  2019-01-10 00:00:00  000001  10.10    1000  1.049981e+06   \n",
      "13  2019-01-10 00:00:00  000002  25.11    1000  1.024864e+06   \n",
      "14  2019-01-11 00:00:00  000001  10.20    1000  1.014659e+06   \n",
      "15  2019-01-11 00:00:00  000002  25.30   -4000  1.115733e+06   \n",
      "16  2019-01-14 00:00:00  000001  10.11   -6000  1.176317e+06   \n",
      "17  2019-01-14 00:00:00  000002  25.02    1000  1.151291e+06   \n",
      "18  2019-01-15 00:00:00  000001  10.24    1000  1.141046e+06   \n",
      "19  2019-01-15 00:00:00  000002  25.16   -5000  1.266688e+06   \n",
      "20  2019-01-16 00:00:00  000001  10.48   -7000  1.339957e+06   \n",
      "21  2019-01-16 00:00:00  000002  25.42    1000  1.314530e+06   \n",
      "22  2019-01-17 00:00:00  000001  10.25   -7000  1.386191e+06   \n",
      "23  2019-01-17 00:00:00  000002  24.97    1000  1.361214e+06   \n",
      "24  2019-01-18 00:00:00  000001  10.43    1000  1.350779e+06   \n",
      "25  2019-01-18 00:00:00  000002  25.76    1000  1.325013e+06   \n",
      "26  2019-01-21 00:00:00  000001  10.34   -8000  1.407630e+06   \n",
      "27  2019-01-21 00:00:00  000002  25.65   -8000  1.612573e+06   \n",
      "28  2019-01-22 00:00:00  000001  10.28   -8000  1.694710e+06   \n",
      "29  2019-01-22 00:00:00  000002  25.40   -8000  1.897656e+06   \n",
      "30  2019-01-23 00:00:00  000001  10.35   -8000  1.980353e+06   \n",
      "31  2019-01-23 00:00:00  000002  25.31    1000  1.955036e+06   \n",
      "32  2019-01-24 00:00:00  000001  10.52   -8000  2.039091e+06   \n",
      "33  2019-01-24 00:00:00  000002  25.41   -9000  2.267495e+06   \n",
      "34  2019-01-25 00:00:00  000001  11.00    1000  2.256490e+06   \n",
      "35  2019-01-25 00:00:00  000002  26.10    1000  2.230384e+06   \n",
      "36  2019-01-28 00:00:00  000001  10.94   -9000  2.328721e+06   \n",
      "37  2019-01-28 00:00:00  000002  26.06    1000  2.302654e+06   \n",
      "38  2019-01-29 00:00:00  000001  11.00    1000  2.291649e+06   \n",
      "39  2019-01-29 00:00:00  000002  26.88  -11000  2.586960e+06   \n",
      "40  2019-01-30 00:00:00  000001  10.95  -10000  2.696323e+06   \n",
      "41  2019-01-30 00:00:00  000002  27.21    1000  2.669106e+06   \n",
      "42  2019-01-31 00:00:00  000001  11.10    1000  2.658001e+06   \n",
      "43  2019-01-31 00:00:00  000002  27.75    1000  2.630244e+06   \n",
      "\n",
      "                                order_id realorder_id trade_id account_cookie  \\\n",
      "0   e23f9e01-e8d2-4a05-93ef-9163ce7a83ee         None     None              x   \n",
      "1   1f430faa-86d1-440b-abf7-a7feddc17954         None     None              x   \n",
      "2   0230d608-91cc-422e-8deb-218f4faef3d7         None     None              x   \n",
      "3   427f1eed-b3bd-4078-94e3-156bf3ae21a6         None     None              x   \n",
      "4   48fd88b8-e3c0-4df5-94ef-62b936345bd9         None     None              x   \n",
      "5   d9aff179-9bc3-4268-b2d5-37eee8de309f         None     None              x   \n",
      "6   41f23955-b920-4f04-bcb7-ca1cd960aa45         None     None              x   \n",
      "7   cb2fdd74-7326-41d9-812f-9d88da447741         None     None              x   \n",
      "8   8ef82ee7-87b8-4f7d-8a01-374f52b60cbb         None     None              x   \n",
      "9   1f63fa52-f56b-4814-8eb3-5e4de849f3cb         None     None              x   \n",
      "10  13e77d45-9e2c-4ef3-89f5-7fa63cc3b808         None     None              x   \n",
      "11  7e714c35-83a4-4cb4-8ab5-d4fb2b31ccb7         None     None              x   \n",
      "12  380f932e-7871-4c72-94d3-5077861c9f53         None     None              x   \n",
      "13  3966e418-9017-4565-b24f-ed9455ef5593         None     None              x   \n",
      "14  99048106-f032-45a2-92c6-5a076f899a8a         None     None              x   \n",
      "15  3529f52a-3c09-46fc-944d-b3c619af7cd7         None     None              x   \n",
      "16  650c29d4-459c-412a-8000-c881af3c662a         None     None              x   \n",
      "17  9d0b7e50-53ac-42df-9175-c3f303387629         None     None              x   \n",
      "18  80ac049d-602e-44ff-a799-3be84acdfe55         None     None              x   \n",
      "19  e354ff47-4298-4d5a-a22e-794e327dee61         None     None              x   \n",
      "20  4977e6e3-e6ee-4d8c-8c43-9b1f027e07b1         None     None              x   \n",
      "21  16d8792c-b2f0-400d-b2a6-aa5c2e473728         None     None              x   \n",
      "22  eff96ddf-6dbb-4af3-a7bd-1f170e632dbc         None     None              x   \n",
      "23  7b21c653-d1d1-44d8-9772-790585915ae4         None     None              x   \n",
      "24  dfe8fbac-ff27-4746-a53a-f6220f3c63a6         None     None              x   \n",
      "25  98e05d3a-cdf5-4cac-bd41-fa747e29a2a4         None     None              x   \n",
      "26  23cd8f74-342a-4796-aeeb-07441bed75e1         None     None              x   \n",
      "27  3f7dad60-3de4-4ca9-ba5e-af87d33594e6         None     None              x   \n",
      "28  f2b9cae9-b1d9-4a00-ba62-ce81baec3d72         None     None              x   \n",
      "29  de5fce65-5a39-42c6-8d6e-914060c5f971         None     None              x   \n",
      "30  3d763d03-c042-4312-a7e3-ffae8fb877b4         None     None              x   \n",
      "31  d41375b6-70c1-4b71-9eab-0ae5f1763fd2         None     None              x   \n",
      "32  3fc5cbfd-354e-4f68-9248-a0853a763435         None     None              x   \n",
      "33  2b065a3c-e510-4f64-ab30-c94a93a0dc51         None     None              x   \n",
      "34  3c140a72-da07-443f-9386-04440fecb9a4         None     None              x   \n",
      "35  0002bf5f-e6ec-433b-b8bd-841e76c93483         None     None              x   \n",
      "36  306a25f0-fc21-4eee-b0bb-9d5a0a57694d         None     None              x   \n",
      "37  a4d75c37-d330-4400-9298-f19665f0043e         None     None              x   \n",
      "38  4ea50c6e-dc9a-4372-a9a5-86ce216c2199         None     None              x   \n",
      "39  9ca9217d-a510-4344-8def-9be6e67ab42f         None     None              x   \n",
      "40  a577bff0-f7d2-4b60-a31c-bcee0cf7dc8f         None     None              x   \n",
      "41  b0a91950-bcc3-4a3e-89d2-eaf5258d4c0c         None     None              x   \n",
      "42  da320f16-b546-4972-891d-5ce1fc4e1ac7         None     None              x   \n",
      "43  3c7c4429-8fae-4684-b917-c99f1c6a2ba4         None     None              x   \n",
      "\n",
      "    commission     tax message  frozen  direction  total_frozen  \n",
      "0       5.0000    0.00    None       0          1             0  \n",
      "1       5.9750    0.00    None       0          1             0  \n",
      "2       5.0000    0.00    None       0          1             0  \n",
      "3       6.0175   24.07    None       0         -1             0  \n",
      "4       5.0000   19.50    None       0         -1             0  \n",
      "5       6.2325    0.00    None       0          1             0  \n",
      "6       5.0000    0.00    None       0          1             0  \n",
      "7      12.5250   50.10    None       0         -1             0  \n",
      "8       7.2450   28.98    None       0         -1             0  \n",
      "9      12.5000   50.00    None       0         -1             0  \n",
      "10      5.0000    0.00    None       0          1             0  \n",
      "11      6.3325    0.00    None       0          1             0  \n",
      "12      5.0000    0.00    None       0          1             0  \n",
      "13      6.2775    0.00    None       0          1             0  \n",
      "14      5.0000    0.00    None       0          1             0  \n",
      "15     25.3000  101.20    None       0         -1             0  \n",
      "16     15.1650   60.66    None       0         -1             0  \n",
      "17      6.2550    0.00    None       0          1             0  \n",
      "18      5.0000    0.00    None       0          1             0  \n",
      "19     31.4500  125.80    None       0         -1             0  \n",
      "20     18.3400   73.36    None       0         -1             0  \n",
      "21      6.3550    0.00    None       0          1             0  \n",
      "22     17.9375   71.75    None       0         -1             0  \n",
      "23      6.2425    0.00    None       0          1             0  \n",
      "24      5.0000    0.00    None       0          1             0  \n",
      "25      6.4400    0.00    None       0          1             0  \n",
      "26     20.6800   82.72    None       0         -1             0  \n",
      "27     51.3000  205.20    None       0         -1             0  \n",
      "28     20.5600   82.24    None       0         -1             0  \n",
      "29     50.8000  203.20    None       0         -1             0  \n",
      "30     20.7000   82.80    None       0         -1             0  \n",
      "31      6.3275    0.00    None       0          1             0  \n",
      "32     21.0400   84.16    None       0         -1             0  \n",
      "33     57.1725  228.69    None       0         -1             0  \n",
      "34      5.0000    0.00    None       0          1             0  \n",
      "35      6.5250    0.00    None       0          1             0  \n",
      "36     24.6150   98.46    None       0         -1             0  \n",
      "37      6.5150    0.00    None       0          1             0  \n",
      "38      5.0000    0.00    None       0          1             0  \n",
      "39     73.9200  295.68    None       0         -1             0  \n",
      "40     27.3750  109.50    None       0         -1             0  \n",
      "41      6.8025    0.00    None       0          1             0  \n",
      "42      5.0000    0.00    None       0          1             0  \n",
      "43      6.9375    0.00    None       0          1             0  \n"
     ]
    },
    {
     "name": "stdin",
     "output_type": "stream",
     "text": [
      " \n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "backtest: Settle!\n",
      "open      1.120000e+01\n",
      "high      1.125000e+01\n",
      "low       1.096000e+01\n",
      "close     1.120000e+01\n",
      "volume    1.014270e+06\n",
      "amount    1.127216e+09\n",
      "Name: (2019-02-01 00:00:00, 000001), dtype: float64\n",
      "---------------under is 当前全市场的market_data --------------\n",
      "                   open   high    low  close     volume        amount\n",
      "2019-02-01 000001  11.2  11.25  10.96   11.2  1014270.0  1.127216e+09\n",
      "---------------under is 当前品种的market_data --------------\n",
      "                    open   high    low  close     volume        amount\n",
      "2019-01-02 000001   9.39   9.42   9.16   9.19   539386.0  4.986951e+08\n",
      "2019-01-03 000001   9.18   9.33   9.15   9.28   415537.0  3.844577e+08\n",
      "2019-01-04 000001   9.24   9.82   9.22   9.75  1481159.0  1.422150e+09\n",
      "2019-01-07 000001   9.84   9.85   9.63   9.74   865687.0  8.411664e+08\n",
      "2019-01-08 000001   9.73   9.74   9.62   9.66   402388.0  3.892478e+08\n",
      "2019-01-09 000001   9.74  10.08   9.70   9.94  1233486.0  1.229465e+09\n",
      "2019-01-10 000001   9.87  10.20   9.86  10.10  1071817.0  1.079711e+09\n",
      "2019-01-11 000001  10.11  10.22  10.05  10.20   696364.0  7.080018e+08\n",
      "2019-01-14 000001  10.22  10.25  10.07  10.11   500443.0  5.078629e+08\n",
      "2019-01-15 000001  10.11  10.28  10.09  10.24   542160.0  5.530273e+08\n",
      "2019-01-16 000001  10.24  10.50  10.23  10.48   977699.0  1.017495e+09\n",
      "2019-01-17 000001  10.54  10.57  10.17  10.25   882811.0  9.102121e+08\n",
      "2019-01-18 000001  10.34  10.49  10.28  10.43   738793.0  7.699736e+08\n",
      "2019-01-21 000001  10.34  10.47  10.32  10.34   659355.0  6.844657e+08\n",
      "2019-01-22 000001  10.34  10.44  10.26  10.28   424413.0  4.389915e+08\n",
      "2019-01-23 000001  10.29  10.47  10.29  10.35   537876.0  5.593844e+08\n",
      "2019-01-24 000001  10.40  10.55  10.37  10.52   679240.0  7.114957e+08\n",
      "2019-01-25 000001  10.56  11.04  10.55  11.00  2108362.0  2.299718e+09\n",
      "2019-01-28 000001  11.04  11.14  10.88  10.94  1035909.0  1.141854e+09\n",
      "2019-01-29 000001  10.96  11.07  10.77  11.00   826631.0  9.048479e+08\n",
      "2019-01-30 000001  10.95  11.18  10.86  10.95   712001.0  7.852045e+08\n",
      "2019-01-31 000001  10.98  11.20  10.94  11.10   831622.0  9.226029e+08\n",
      "2019-02-01 000001  11.20  11.25  10.96  11.20  1014270.0  1.127216e+09\n",
      "000001\n",
      "---------------under is 账户情况和持仓情况 -------------------\n",
      "{'code': '000001', 'instrument_id': '000001', 'user_id': 'x', 'portfolio_cookie': 'default', 'username': 'quantaxis', 'position_id': 'd2b24d5c-fb1e-4a2e-97eb-f19b04f544ec', 'account_cookie': 'x', 'frozen': {}, 'name': None, 'spms_id': None, 'oms_id': None, 'market_type': 'stock_cn', 'exchange_id': None, 'moneypreset': 100000, 'moneypresetLeft': 100000, 'lastupdatetime': '', 'volume_long_today': 12000, 'volume_long_his': 0, 'volume_long': 12000, 'volume_short_today': 0, 'volume_short_his': 0, 'volume_short': 0, 'volume_long_frozen_today': 0, 'volume_long_frozen_his': 0, 'volume_long_frozen': 0, 'volume_short_frozen_today': 0, 'volume_short_frozen_his': 0, 'volume_short_frozen': 0, 'margin_long': 123420.0, 'margin_short': 0, 'margin': 123420.0, 'position_price_long': 10.285, 'position_cost_long': 123420.0, 'position_price_short': 0, 'position_cost_short': 0, 'open_price_long': 10.285, 'open_cost_long': 123420.0, 'open_price_short': 0, 'open_cost_short': 0, 'trades': [], 'orders': {}, 'last_price': 11.2, 'float_profit_long': 10980.0, 'float_profit_short': 0.0, 'float_profit': 10980.0, 'position_profit_long': 10980.0, 'position_profit_short': 0.0, 'position_profit': 10980.0}\n",
      "               datetime    code  price  amount          cash  \\\n",
      "0   2019-01-02 00:00:00  000001   9.19    1000  9.908050e+05   \n",
      "1   2019-01-02 00:00:00  000002  23.90    1000  9.668990e+05   \n",
      "2   2019-01-03 00:00:00  000001   9.28    1000  9.576140e+05   \n",
      "3   2019-01-03 00:00:00  000002  24.07   -1000  9.816539e+05   \n",
      "4   2019-01-04 00:00:00  000001   9.75   -2000  1.001129e+06   \n",
      "5   2019-01-04 00:00:00  000002  24.93    1000  9.761932e+05   \n",
      "6   2019-01-07 00:00:00  000001   9.74    1000  9.664482e+05   \n",
      "7   2019-01-07 00:00:00  000002  25.05   -2000  1.016486e+06   \n",
      "8   2019-01-08 00:00:00  000001   9.66   -3000  1.045429e+06   \n",
      "9   2019-01-08 00:00:00  000002  25.00   -2000  1.095367e+06   \n",
      "10  2019-01-09 00:00:00  000001   9.94    1000  1.085422e+06   \n",
      "11  2019-01-09 00:00:00  000002  25.33    1000  1.060086e+06   \n",
      "12  2019-01-10 00:00:00  000001  10.10    1000  1.049981e+06   \n",
      "13  2019-01-10 00:00:00  000002  25.11    1000  1.024864e+06   \n",
      "14  2019-01-11 00:00:00  000001  10.20    1000  1.014659e+06   \n",
      "15  2019-01-11 00:00:00  000002  25.30   -4000  1.115733e+06   \n",
      "16  2019-01-14 00:00:00  000001  10.11   -6000  1.176317e+06   \n",
      "17  2019-01-14 00:00:00  000002  25.02    1000  1.151291e+06   \n",
      "18  2019-01-15 00:00:00  000001  10.24    1000  1.141046e+06   \n",
      "19  2019-01-15 00:00:00  000002  25.16   -5000  1.266688e+06   \n",
      "20  2019-01-16 00:00:00  000001  10.48   -7000  1.339957e+06   \n",
      "21  2019-01-16 00:00:00  000002  25.42    1000  1.314530e+06   \n",
      "22  2019-01-17 00:00:00  000001  10.25   -7000  1.386191e+06   \n",
      "23  2019-01-17 00:00:00  000002  24.97    1000  1.361214e+06   \n",
      "24  2019-01-18 00:00:00  000001  10.43    1000  1.350779e+06   \n",
      "25  2019-01-18 00:00:00  000002  25.76    1000  1.325013e+06   \n",
      "26  2019-01-21 00:00:00  000001  10.34   -8000  1.407630e+06   \n",
      "27  2019-01-21 00:00:00  000002  25.65   -8000  1.612573e+06   \n",
      "28  2019-01-22 00:00:00  000001  10.28   -8000  1.694710e+06   \n",
      "29  2019-01-22 00:00:00  000002  25.40   -8000  1.897656e+06   \n",
      "30  2019-01-23 00:00:00  000001  10.35   -8000  1.980353e+06   \n",
      "31  2019-01-23 00:00:00  000002  25.31    1000  1.955036e+06   \n",
      "32  2019-01-24 00:00:00  000001  10.52   -8000  2.039091e+06   \n",
      "33  2019-01-24 00:00:00  000002  25.41   -9000  2.267495e+06   \n",
      "34  2019-01-25 00:00:00  000001  11.00    1000  2.256490e+06   \n",
      "35  2019-01-25 00:00:00  000002  26.10    1000  2.230384e+06   \n",
      "36  2019-01-28 00:00:00  000001  10.94   -9000  2.328721e+06   \n",
      "37  2019-01-28 00:00:00  000002  26.06    1000  2.302654e+06   \n",
      "38  2019-01-29 00:00:00  000001  11.00    1000  2.291649e+06   \n",
      "39  2019-01-29 00:00:00  000002  26.88  -11000  2.586960e+06   \n",
      "40  2019-01-30 00:00:00  000001  10.95  -10000  2.696323e+06   \n",
      "41  2019-01-30 00:00:00  000002  27.21    1000  2.669106e+06   \n",
      "42  2019-01-31 00:00:00  000001  11.10    1000  2.658001e+06   \n",
      "43  2019-01-31 00:00:00  000002  27.75    1000  2.630244e+06   \n",
      "44  2019-02-01 00:00:00  000001  11.20    1000  2.619039e+06   \n",
      "\n",
      "                                order_id realorder_id trade_id account_cookie  \\\n",
      "0   e23f9e01-e8d2-4a05-93ef-9163ce7a83ee         None     None              x   \n",
      "1   1f430faa-86d1-440b-abf7-a7feddc17954         None     None              x   \n",
      "2   0230d608-91cc-422e-8deb-218f4faef3d7         None     None              x   \n",
      "3   427f1eed-b3bd-4078-94e3-156bf3ae21a6         None     None              x   \n",
      "4   48fd88b8-e3c0-4df5-94ef-62b936345bd9         None     None              x   \n",
      "5   d9aff179-9bc3-4268-b2d5-37eee8de309f         None     None              x   \n",
      "6   41f23955-b920-4f04-bcb7-ca1cd960aa45         None     None              x   \n",
      "7   cb2fdd74-7326-41d9-812f-9d88da447741         None     None              x   \n",
      "8   8ef82ee7-87b8-4f7d-8a01-374f52b60cbb         None     None              x   \n",
      "9   1f63fa52-f56b-4814-8eb3-5e4de849f3cb         None     None              x   \n",
      "10  13e77d45-9e2c-4ef3-89f5-7fa63cc3b808         None     None              x   \n",
      "11  7e714c35-83a4-4cb4-8ab5-d4fb2b31ccb7         None     None              x   \n",
      "12  380f932e-7871-4c72-94d3-5077861c9f53         None     None              x   \n",
      "13  3966e418-9017-4565-b24f-ed9455ef5593         None     None              x   \n",
      "14  99048106-f032-45a2-92c6-5a076f899a8a         None     None              x   \n",
      "15  3529f52a-3c09-46fc-944d-b3c619af7cd7         None     None              x   \n",
      "16  650c29d4-459c-412a-8000-c881af3c662a         None     None              x   \n",
      "17  9d0b7e50-53ac-42df-9175-c3f303387629         None     None              x   \n",
      "18  80ac049d-602e-44ff-a799-3be84acdfe55         None     None              x   \n",
      "19  e354ff47-4298-4d5a-a22e-794e327dee61         None     None              x   \n",
      "20  4977e6e3-e6ee-4d8c-8c43-9b1f027e07b1         None     None              x   \n",
      "21  16d8792c-b2f0-400d-b2a6-aa5c2e473728         None     None              x   \n",
      "22  eff96ddf-6dbb-4af3-a7bd-1f170e632dbc         None     None              x   \n",
      "23  7b21c653-d1d1-44d8-9772-790585915ae4         None     None              x   \n",
      "24  dfe8fbac-ff27-4746-a53a-f6220f3c63a6         None     None              x   \n",
      "25  98e05d3a-cdf5-4cac-bd41-fa747e29a2a4         None     None              x   \n",
      "26  23cd8f74-342a-4796-aeeb-07441bed75e1         None     None              x   \n",
      "27  3f7dad60-3de4-4ca9-ba5e-af87d33594e6         None     None              x   \n",
      "28  f2b9cae9-b1d9-4a00-ba62-ce81baec3d72         None     None              x   \n",
      "29  de5fce65-5a39-42c6-8d6e-914060c5f971         None     None              x   \n",
      "30  3d763d03-c042-4312-a7e3-ffae8fb877b4         None     None              x   \n",
      "31  d41375b6-70c1-4b71-9eab-0ae5f1763fd2         None     None              x   \n",
      "32  3fc5cbfd-354e-4f68-9248-a0853a763435         None     None              x   \n",
      "33  2b065a3c-e510-4f64-ab30-c94a93a0dc51         None     None              x   \n",
      "34  3c140a72-da07-443f-9386-04440fecb9a4         None     None              x   \n",
      "35  0002bf5f-e6ec-433b-b8bd-841e76c93483         None     None              x   \n",
      "36  306a25f0-fc21-4eee-b0bb-9d5a0a57694d         None     None              x   \n",
      "37  a4d75c37-d330-4400-9298-f19665f0043e         None     None              x   \n",
      "38  4ea50c6e-dc9a-4372-a9a5-86ce216c2199         None     None              x   \n",
      "39  9ca9217d-a510-4344-8def-9be6e67ab42f         None     None              x   \n",
      "40  a577bff0-f7d2-4b60-a31c-bcee0cf7dc8f         None     None              x   \n",
      "41  b0a91950-bcc3-4a3e-89d2-eaf5258d4c0c         None     None              x   \n",
      "42  da320f16-b546-4972-891d-5ce1fc4e1ac7         None     None              x   \n",
      "43  3c7c4429-8fae-4684-b917-c99f1c6a2ba4         None     None              x   \n",
      "44  6bd6d067-1afd-4337-ac1e-a312bb67b83c         None     None              x   \n",
      "\n",
      "    commission     tax message  frozen  direction  total_frozen  \n",
      "0       5.0000    0.00    None       0          1             0  \n",
      "1       5.9750    0.00    None       0          1             0  \n",
      "2       5.0000    0.00    None       0          1             0  \n",
      "3       6.0175   24.07    None       0         -1             0  \n",
      "4       5.0000   19.50    None       0         -1             0  \n",
      "5       6.2325    0.00    None       0          1             0  \n",
      "6       5.0000    0.00    None       0          1             0  \n",
      "7      12.5250   50.10    None       0         -1             0  \n",
      "8       7.2450   28.98    None       0         -1             0  \n",
      "9      12.5000   50.00    None       0         -1             0  \n",
      "10      5.0000    0.00    None       0          1             0  \n",
      "11      6.3325    0.00    None       0          1             0  \n",
      "12      5.0000    0.00    None       0          1             0  \n",
      "13      6.2775    0.00    None       0          1             0  \n",
      "14      5.0000    0.00    None       0          1             0  \n",
      "15     25.3000  101.20    None       0         -1             0  \n",
      "16     15.1650   60.66    None       0         -1             0  \n",
      "17      6.2550    0.00    None       0          1             0  \n",
      "18      5.0000    0.00    None       0          1             0  \n",
      "19     31.4500  125.80    None       0         -1             0  \n",
      "20     18.3400   73.36    None       0         -1             0  \n",
      "21      6.3550    0.00    None       0          1             0  \n",
      "22     17.9375   71.75    None       0         -1             0  \n",
      "23      6.2425    0.00    None       0          1             0  \n",
      "24      5.0000    0.00    None       0          1             0  \n",
      "25      6.4400    0.00    None       0          1             0  \n",
      "26     20.6800   82.72    None       0         -1             0  \n",
      "27     51.3000  205.20    None       0         -1             0  \n",
      "28     20.5600   82.24    None       0         -1             0  \n",
      "29     50.8000  203.20    None       0         -1             0  \n",
      "30     20.7000   82.80    None       0         -1             0  \n",
      "31      6.3275    0.00    None       0          1             0  \n",
      "32     21.0400   84.16    None       0         -1             0  \n",
      "33     57.1725  228.69    None       0         -1             0  \n",
      "34      5.0000    0.00    None       0          1             0  \n",
      "35      6.5250    0.00    None       0          1             0  \n",
      "36     24.6150   98.46    None       0         -1             0  \n",
      "37      6.5150    0.00    None       0          1             0  \n",
      "38      5.0000    0.00    None       0          1             0  \n",
      "39     73.9200  295.68    None       0         -1             0  \n",
      "40     27.3750  109.50    None       0         -1             0  \n",
      "41      6.8025    0.00    None       0          1             0  \n",
      "42      5.0000    0.00    None       0          1             0  \n",
      "43      6.9375    0.00    None       0          1             0  \n",
      "44      5.0000    0.00    None       0          1             0  \n"
     ]
    },
    {
     "name": "stdin",
     "output_type": "stream",
     "text": [
      " \n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "open      2.815000e+01\n",
      "high      2.822000e+01\n",
      "low       2.698000e+01\n",
      "close     2.768000e+01\n",
      "volume    5.185430e+05\n",
      "amount    1.415838e+09\n",
      "Name: (2019-02-01 00:00:00, 000002), dtype: float64\n",
      "---------------under is 当前全市场的market_data --------------\n",
      "                    open   high    low  close     volume        amount\n",
      "2019-02-01 000001  11.20  11.25  10.96  11.20  1014270.0  1.127216e+09\n",
      "           000002  28.15  28.22  26.98  27.68   518543.0  1.415838e+09\n",
      "---------------under is 当前品种的market_data --------------\n",
      "                    open   high    low  close    volume        amount\n",
      "2019-01-02 000002  23.83  24.09  23.67  23.90  247010.0  5.893846e+08\n",
      "2019-01-03 000002  23.79  24.50  23.71  24.07  222353.0  5.363333e+08\n",
      "2019-01-04 000002  23.91  25.00  23.85  24.93  377727.0  9.270117e+08\n",
      "2019-01-07 000002  25.29  25.53  24.99  25.05  427154.0  1.077909e+09\n",
      "2019-01-08 000002  25.05  25.20  24.63  25.00  214382.0  5.336044e+08\n",
      "2019-01-09 000002  25.40  25.88  25.11  25.33  340140.0  8.670814e+08\n",
      "2019-01-10 000002  25.22  25.56  25.03  25.11  224649.0  5.689526e+08\n",
      "2019-01-11 000002  25.10  25.54  25.01  25.30  240694.0  6.069947e+08\n",
      "2019-01-14 000002  25.13  25.30  24.92  25.02  183281.0  4.591518e+08\n",
      "2019-01-15 000002  25.00  25.16  24.32  25.16  368758.0  9.149835e+08\n",
      "2019-01-16 000002  25.15  25.50  24.83  25.42  267466.0  6.766856e+08\n",
      "2019-01-17 000002  25.50  25.50  24.94  24.97  245895.0  6.188767e+08\n",
      "2019-01-18 000002  25.00  25.76  24.99  25.76  365723.0  9.334642e+08\n",
      "2019-01-21 000002  25.71  25.95  25.40  25.65  255499.0  6.558207e+08\n",
      "2019-01-22 000002  25.50  26.17  25.23  25.40  379336.0  9.748227e+08\n",
      "2019-01-23 000002  25.35  25.49  25.20  25.31  146847.0  3.718901e+08\n",
      "2019-01-24 000002  25.42  25.54  24.93  25.41  234931.0  5.928229e+08\n",
      "2019-01-25 000002  25.51  26.35  25.49  26.10  451756.0  1.176480e+09\n",
      "2019-01-28 000002  26.20  26.62  25.86  26.06  308906.0  8.102888e+08\n",
      "2019-01-29 000002  25.91  26.88  25.87  26.88  368071.0  9.742794e+08\n",
      "2019-01-30 000002  26.70  27.82  26.63  27.21  592303.0  1.615187e+09\n",
      "2019-01-31 000002  27.39  28.15  27.00  27.75  411857.0  1.138512e+09\n",
      "2019-02-01 000002  28.15  28.22  26.98  27.68  518543.0  1.415838e+09\n",
      "000002\n",
      "---------------under is 账户情况和持仓情况 -------------------\n",
      "{'code': '000002', 'instrument_id': '000002', 'user_id': 'x', 'portfolio_cookie': 'default', 'username': 'quantaxis', 'position_id': '5aa694d0-3861-43a8-9efc-84f380138bea', 'account_cookie': 'x', 'frozen': {}, 'name': None, 'spms_id': None, 'oms_id': None, 'market_type': 'stock_cn', 'exchange_id': None, 'moneypreset': 100000, 'moneypresetLeft': 100000, 'lastupdatetime': '', 'volume_long_today': 14000, 'volume_long_his': 0, 'volume_long': 14000, 'volume_short_today': 0, 'volume_short_his': 0, 'volume_short': 0, 'volume_long_frozen_today': 0, 'volume_long_frozen_his': 0, 'volume_long_frozen': 0, 'volume_short_frozen_today': 0, 'volume_short_frozen_his': 0, 'volume_short_frozen': 0, 'margin_long': 360550.0, 'margin_short': 0, 'margin': 360550.0, 'position_price_long': 25.75357142857143, 'position_cost_long': 360550.0, 'position_price_short': 0, 'position_cost_short': 0, 'open_price_long': 25.75357142857143, 'open_cost_long': 360550.0, 'open_price_short': 0, 'open_cost_short': 0, 'trades': [], 'orders': {}, 'last_price': 27.68, 'float_profit_long': 26970.0, 'float_profit_short': 0.0, 'float_profit': 26970.0, 'position_profit_long': 26970.0, 'position_profit_short': 0.0, 'position_profit': 26970.0}\n",
      "               datetime    code  price  amount          cash  \\\n",
      "0   2019-01-02 00:00:00  000001   9.19    1000  9.908050e+05   \n",
      "1   2019-01-02 00:00:00  000002  23.90    1000  9.668990e+05   \n",
      "2   2019-01-03 00:00:00  000001   9.28    1000  9.576140e+05   \n",
      "3   2019-01-03 00:00:00  000002  24.07   -1000  9.816539e+05   \n",
      "4   2019-01-04 00:00:00  000001   9.75   -2000  1.001129e+06   \n",
      "5   2019-01-04 00:00:00  000002  24.93    1000  9.761932e+05   \n",
      "6   2019-01-07 00:00:00  000001   9.74    1000  9.664482e+05   \n",
      "7   2019-01-07 00:00:00  000002  25.05   -2000  1.016486e+06   \n",
      "8   2019-01-08 00:00:00  000001   9.66   -3000  1.045429e+06   \n",
      "9   2019-01-08 00:00:00  000002  25.00   -2000  1.095367e+06   \n",
      "10  2019-01-09 00:00:00  000001   9.94    1000  1.085422e+06   \n",
      "11  2019-01-09 00:00:00  000002  25.33    1000  1.060086e+06   \n",
      "12  2019-01-10 00:00:00  000001  10.10    1000  1.049981e+06   \n",
      "13  2019-01-10 00:00:00  000002  25.11    1000  1.024864e+06   \n",
      "14  2019-01-11 00:00:00  000001  10.20    1000  1.014659e+06   \n",
      "15  2019-01-11 00:00:00  000002  25.30   -4000  1.115733e+06   \n",
      "16  2019-01-14 00:00:00  000001  10.11   -6000  1.176317e+06   \n",
      "17  2019-01-14 00:00:00  000002  25.02    1000  1.151291e+06   \n",
      "18  2019-01-15 00:00:00  000001  10.24    1000  1.141046e+06   \n",
      "19  2019-01-15 00:00:00  000002  25.16   -5000  1.266688e+06   \n",
      "20  2019-01-16 00:00:00  000001  10.48   -7000  1.339957e+06   \n",
      "21  2019-01-16 00:00:00  000002  25.42    1000  1.314530e+06   \n",
      "22  2019-01-17 00:00:00  000001  10.25   -7000  1.386191e+06   \n",
      "23  2019-01-17 00:00:00  000002  24.97    1000  1.361214e+06   \n",
      "24  2019-01-18 00:00:00  000001  10.43    1000  1.350779e+06   \n",
      "25  2019-01-18 00:00:00  000002  25.76    1000  1.325013e+06   \n",
      "26  2019-01-21 00:00:00  000001  10.34   -8000  1.407630e+06   \n",
      "27  2019-01-21 00:00:00  000002  25.65   -8000  1.612573e+06   \n",
      "28  2019-01-22 00:00:00  000001  10.28   -8000  1.694710e+06   \n",
      "29  2019-01-22 00:00:00  000002  25.40   -8000  1.897656e+06   \n",
      "30  2019-01-23 00:00:00  000001  10.35   -8000  1.980353e+06   \n",
      "31  2019-01-23 00:00:00  000002  25.31    1000  1.955036e+06   \n",
      "32  2019-01-24 00:00:00  000001  10.52   -8000  2.039091e+06   \n",
      "33  2019-01-24 00:00:00  000002  25.41   -9000  2.267495e+06   \n",
      "34  2019-01-25 00:00:00  000001  11.00    1000  2.256490e+06   \n",
      "35  2019-01-25 00:00:00  000002  26.10    1000  2.230384e+06   \n",
      "36  2019-01-28 00:00:00  000001  10.94   -9000  2.328721e+06   \n",
      "37  2019-01-28 00:00:00  000002  26.06    1000  2.302654e+06   \n",
      "38  2019-01-29 00:00:00  000001  11.00    1000  2.291649e+06   \n",
      "39  2019-01-29 00:00:00  000002  26.88  -11000  2.586960e+06   \n",
      "40  2019-01-30 00:00:00  000001  10.95  -10000  2.696323e+06   \n",
      "41  2019-01-30 00:00:00  000002  27.21    1000  2.669106e+06   \n",
      "42  2019-01-31 00:00:00  000001  11.10    1000  2.658001e+06   \n",
      "43  2019-01-31 00:00:00  000002  27.75    1000  2.630244e+06   \n",
      "44  2019-02-01 00:00:00  000001  11.20    1000  2.619039e+06   \n",
      "45  2019-02-01 00:00:00  000002  27.68    1000  2.591352e+06   \n",
      "\n",
      "                                order_id realorder_id trade_id account_cookie  \\\n",
      "0   e23f9e01-e8d2-4a05-93ef-9163ce7a83ee         None     None              x   \n",
      "1   1f430faa-86d1-440b-abf7-a7feddc17954         None     None              x   \n",
      "2   0230d608-91cc-422e-8deb-218f4faef3d7         None     None              x   \n",
      "3   427f1eed-b3bd-4078-94e3-156bf3ae21a6         None     None              x   \n",
      "4   48fd88b8-e3c0-4df5-94ef-62b936345bd9         None     None              x   \n",
      "5   d9aff179-9bc3-4268-b2d5-37eee8de309f         None     None              x   \n",
      "6   41f23955-b920-4f04-bcb7-ca1cd960aa45         None     None              x   \n",
      "7   cb2fdd74-7326-41d9-812f-9d88da447741         None     None              x   \n",
      "8   8ef82ee7-87b8-4f7d-8a01-374f52b60cbb         None     None              x   \n",
      "9   1f63fa52-f56b-4814-8eb3-5e4de849f3cb         None     None              x   \n",
      "10  13e77d45-9e2c-4ef3-89f5-7fa63cc3b808         None     None              x   \n",
      "11  7e714c35-83a4-4cb4-8ab5-d4fb2b31ccb7         None     None              x   \n",
      "12  380f932e-7871-4c72-94d3-5077861c9f53         None     None              x   \n",
      "13  3966e418-9017-4565-b24f-ed9455ef5593         None     None              x   \n",
      "14  99048106-f032-45a2-92c6-5a076f899a8a         None     None              x   \n",
      "15  3529f52a-3c09-46fc-944d-b3c619af7cd7         None     None              x   \n",
      "16  650c29d4-459c-412a-8000-c881af3c662a         None     None              x   \n",
      "17  9d0b7e50-53ac-42df-9175-c3f303387629         None     None              x   \n",
      "18  80ac049d-602e-44ff-a799-3be84acdfe55         None     None              x   \n",
      "19  e354ff47-4298-4d5a-a22e-794e327dee61         None     None              x   \n",
      "20  4977e6e3-e6ee-4d8c-8c43-9b1f027e07b1         None     None              x   \n",
      "21  16d8792c-b2f0-400d-b2a6-aa5c2e473728         None     None              x   \n",
      "22  eff96ddf-6dbb-4af3-a7bd-1f170e632dbc         None     None              x   \n",
      "23  7b21c653-d1d1-44d8-9772-790585915ae4         None     None              x   \n",
      "24  dfe8fbac-ff27-4746-a53a-f6220f3c63a6         None     None              x   \n",
      "25  98e05d3a-cdf5-4cac-bd41-fa747e29a2a4         None     None              x   \n",
      "26  23cd8f74-342a-4796-aeeb-07441bed75e1         None     None              x   \n",
      "27  3f7dad60-3de4-4ca9-ba5e-af87d33594e6         None     None              x   \n",
      "28  f2b9cae9-b1d9-4a00-ba62-ce81baec3d72         None     None              x   \n",
      "29  de5fce65-5a39-42c6-8d6e-914060c5f971         None     None              x   \n",
      "30  3d763d03-c042-4312-a7e3-ffae8fb877b4         None     None              x   \n",
      "31  d41375b6-70c1-4b71-9eab-0ae5f1763fd2         None     None              x   \n",
      "32  3fc5cbfd-354e-4f68-9248-a0853a763435         None     None              x   \n",
      "33  2b065a3c-e510-4f64-ab30-c94a93a0dc51         None     None              x   \n",
      "34  3c140a72-da07-443f-9386-04440fecb9a4         None     None              x   \n",
      "35  0002bf5f-e6ec-433b-b8bd-841e76c93483         None     None              x   \n",
      "36  306a25f0-fc21-4eee-b0bb-9d5a0a57694d         None     None              x   \n",
      "37  a4d75c37-d330-4400-9298-f19665f0043e         None     None              x   \n",
      "38  4ea50c6e-dc9a-4372-a9a5-86ce216c2199         None     None              x   \n",
      "39  9ca9217d-a510-4344-8def-9be6e67ab42f         None     None              x   \n",
      "40  a577bff0-f7d2-4b60-a31c-bcee0cf7dc8f         None     None              x   \n",
      "41  b0a91950-bcc3-4a3e-89d2-eaf5258d4c0c         None     None              x   \n",
      "42  da320f16-b546-4972-891d-5ce1fc4e1ac7         None     None              x   \n",
      "43  3c7c4429-8fae-4684-b917-c99f1c6a2ba4         None     None              x   \n",
      "44  6bd6d067-1afd-4337-ac1e-a312bb67b83c         None     None              x   \n",
      "45  8da82eda-4b0c-4a00-a362-e397de44295b         None     None              x   \n",
      "\n",
      "    commission     tax message  frozen  direction  total_frozen  \n",
      "0       5.0000    0.00    None       0          1             0  \n",
      "1       5.9750    0.00    None       0          1             0  \n",
      "2       5.0000    0.00    None       0          1             0  \n",
      "3       6.0175   24.07    None       0         -1             0  \n",
      "4       5.0000   19.50    None       0         -1             0  \n",
      "5       6.2325    0.00    None       0          1             0  \n",
      "6       5.0000    0.00    None       0          1             0  \n",
      "7      12.5250   50.10    None       0         -1             0  \n",
      "8       7.2450   28.98    None       0         -1             0  \n",
      "9      12.5000   50.00    None       0         -1             0  \n",
      "10      5.0000    0.00    None       0          1             0  \n",
      "11      6.3325    0.00    None       0          1             0  \n",
      "12      5.0000    0.00    None       0          1             0  \n",
      "13      6.2775    0.00    None       0          1             0  \n",
      "14      5.0000    0.00    None       0          1             0  \n",
      "15     25.3000  101.20    None       0         -1             0  \n",
      "16     15.1650   60.66    None       0         -1             0  \n",
      "17      6.2550    0.00    None       0          1             0  \n",
      "18      5.0000    0.00    None       0          1             0  \n",
      "19     31.4500  125.80    None       0         -1             0  \n",
      "20     18.3400   73.36    None       0         -1             0  \n",
      "21      6.3550    0.00    None       0          1             0  \n",
      "22     17.9375   71.75    None       0         -1             0  \n",
      "23      6.2425    0.00    None       0          1             0  \n",
      "24      5.0000    0.00    None       0          1             0  \n",
      "25      6.4400    0.00    None       0          1             0  \n",
      "26     20.6800   82.72    None       0         -1             0  \n",
      "27     51.3000  205.20    None       0         -1             0  \n",
      "28     20.5600   82.24    None       0         -1             0  \n",
      "29     50.8000  203.20    None       0         -1             0  \n",
      "30     20.7000   82.80    None       0         -1             0  \n",
      "31      6.3275    0.00    None       0          1             0  \n",
      "32     21.0400   84.16    None       0         -1             0  \n",
      "33     57.1725  228.69    None       0         -1             0  \n",
      "34      5.0000    0.00    None       0          1             0  \n",
      "35      6.5250    0.00    None       0          1             0  \n",
      "36     24.6150   98.46    None       0         -1             0  \n",
      "37      6.5150    0.00    None       0          1             0  \n",
      "38      5.0000    0.00    None       0          1             0  \n",
      "39     73.9200  295.68    None       0         -1             0  \n",
      "40     27.3750  109.50    None       0         -1             0  \n",
      "41      6.8025    0.00    None       0          1             0  \n",
      "42      5.0000    0.00    None       0          1             0  \n",
      "43      6.9375    0.00    None       0          1             0  \n",
      "44      5.0000    0.00    None       0          1             0  \n",
      "45      6.9200    0.00    None       0          1             0  \n"
     ]
    },
    {
     "name": "stdin",
     "output_type": "stream",
     "text": [
      " \n"
     ]
    }
   ],
   "source": [
    "s.debug()\n",
    "\n",
    "\n",
    "\n",
    "\n",
    "\n",
    "\n",
    "\n",
    "\n",
    "\n",
    "\n",
    "\n",
    "\n",
    "\n",
    "\n",
    "\n",
    "\n",
    "\n",
    "\n",
    "\n",
    "\n",
    "\n",
    "\n",
    "\n",
    "\n",
    "\n",
    "\n",
    "\n",
    "\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>datetime</th>\n",
       "      <th>code</th>\n",
       "      <th>price</th>\n",
       "      <th>amount</th>\n",
       "      <th>cash</th>\n",
       "      <th>order_id</th>\n",
       "      <th>realorder_id</th>\n",
       "      <th>trade_id</th>\n",
       "      <th>account_cookie</th>\n",
       "      <th>commission</th>\n",
       "      <th>tax</th>\n",
       "      <th>message</th>\n",
       "      <th>frozen</th>\n",
       "      <th>direction</th>\n",
       "      <th>total_frozen</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>2019-01-02 00:00:00</td>\n",
       "      <td>000001</td>\n",
       "      <td>9.19</td>\n",
       "      <td>1000</td>\n",
       "      <td>9.908050e+05</td>\n",
       "      <td>e23f9e01-e8d2-4a05-93ef-9163ce7a83ee</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>x</td>\n",
       "      <td>5.0000</td>\n",
       "      <td>0.00</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2019-01-02 00:00:00</td>\n",
       "      <td>000002</td>\n",
       "      <td>23.90</td>\n",
       "      <td>1000</td>\n",
       "      <td>9.668990e+05</td>\n",
       "      <td>1f430faa-86d1-440b-abf7-a7feddc17954</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>x</td>\n",
       "      <td>5.9750</td>\n",
       "      <td>0.00</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>2019-01-03 00:00:00</td>\n",
       "      <td>000001</td>\n",
       "      <td>9.28</td>\n",
       "      <td>1000</td>\n",
       "      <td>9.576140e+05</td>\n",
       "      <td>0230d608-91cc-422e-8deb-218f4faef3d7</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>x</td>\n",
       "      <td>5.0000</td>\n",
       "      <td>0.00</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>2019-01-03 00:00:00</td>\n",
       "      <td>000002</td>\n",
       "      <td>24.07</td>\n",
       "      <td>-1000</td>\n",
       "      <td>9.816539e+05</td>\n",
       "      <td>427f1eed-b3bd-4078-94e3-156bf3ae21a6</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>x</td>\n",
       "      <td>6.0175</td>\n",
       "      <td>24.07</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>-1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>2019-01-04 00:00:00</td>\n",
       "      <td>000001</td>\n",
       "      <td>9.75</td>\n",
       "      <td>-2000</td>\n",
       "      <td>1.001129e+06</td>\n",
       "      <td>48fd88b8-e3c0-4df5-94ef-62b936345bd9</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>x</td>\n",
       "      <td>5.0000</td>\n",
       "      <td>19.50</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>-1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>2019-01-04 00:00:00</td>\n",
       "      <td>000002</td>\n",
       "      <td>24.93</td>\n",
       "      <td>1000</td>\n",
       "      <td>9.761932e+05</td>\n",
       "      <td>d9aff179-9bc3-4268-b2d5-37eee8de309f</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>x</td>\n",
       "      <td>6.2325</td>\n",
       "      <td>0.00</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>2019-01-07 00:00:00</td>\n",
       "      <td>000001</td>\n",
       "      <td>9.74</td>\n",
       "      <td>1000</td>\n",
       "      <td>9.664482e+05</td>\n",
       "      <td>41f23955-b920-4f04-bcb7-ca1cd960aa45</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>x</td>\n",
       "      <td>5.0000</td>\n",
       "      <td>0.00</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>2019-01-07 00:00:00</td>\n",
       "      <td>000002</td>\n",
       "      <td>25.05</td>\n",
       "      <td>-2000</td>\n",
       "      <td>1.016486e+06</td>\n",
       "      <td>cb2fdd74-7326-41d9-812f-9d88da447741</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>x</td>\n",
       "      <td>12.5250</td>\n",
       "      <td>50.10</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>-1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>2019-01-08 00:00:00</td>\n",
       "      <td>000001</td>\n",
       "      <td>9.66</td>\n",
       "      <td>-3000</td>\n",
       "      <td>1.045429e+06</td>\n",
       "      <td>8ef82ee7-87b8-4f7d-8a01-374f52b60cbb</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>x</td>\n",
       "      <td>7.2450</td>\n",
       "      <td>28.98</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>-1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>2019-01-08 00:00:00</td>\n",
       "      <td>000002</td>\n",
       "      <td>25.00</td>\n",
       "      <td>-2000</td>\n",
       "      <td>1.095367e+06</td>\n",
       "      <td>1f63fa52-f56b-4814-8eb3-5e4de849f3cb</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>x</td>\n",
       "      <td>12.5000</td>\n",
       "      <td>50.00</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>-1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>2019-01-09 00:00:00</td>\n",
       "      <td>000001</td>\n",
       "      <td>9.94</td>\n",
       "      <td>1000</td>\n",
       "      <td>1.085422e+06</td>\n",
       "      <td>13e77d45-9e2c-4ef3-89f5-7fa63cc3b808</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>x</td>\n",
       "      <td>5.0000</td>\n",
       "      <td>0.00</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>2019-01-09 00:00:00</td>\n",
       "      <td>000002</td>\n",
       "      <td>25.33</td>\n",
       "      <td>1000</td>\n",
       "      <td>1.060086e+06</td>\n",
       "      <td>7e714c35-83a4-4cb4-8ab5-d4fb2b31ccb7</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>x</td>\n",
       "      <td>6.3325</td>\n",
       "      <td>0.00</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>2019-01-10 00:00:00</td>\n",
       "      <td>000001</td>\n",
       "      <td>10.10</td>\n",
       "      <td>1000</td>\n",
       "      <td>1.049981e+06</td>\n",
       "      <td>380f932e-7871-4c72-94d3-5077861c9f53</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>x</td>\n",
       "      <td>5.0000</td>\n",
       "      <td>0.00</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>2019-01-10 00:00:00</td>\n",
       "      <td>000002</td>\n",
       "      <td>25.11</td>\n",
       "      <td>1000</td>\n",
       "      <td>1.024864e+06</td>\n",
       "      <td>3966e418-9017-4565-b24f-ed9455ef5593</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>x</td>\n",
       "      <td>6.2775</td>\n",
       "      <td>0.00</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>2019-01-11 00:00:00</td>\n",
       "      <td>000001</td>\n",
       "      <td>10.20</td>\n",
       "      <td>1000</td>\n",
       "      <td>1.014659e+06</td>\n",
       "      <td>99048106-f032-45a2-92c6-5a076f899a8a</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>x</td>\n",
       "      <td>5.0000</td>\n",
       "      <td>0.00</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>2019-01-11 00:00:00</td>\n",
       "      <td>000002</td>\n",
       "      <td>25.30</td>\n",
       "      <td>-4000</td>\n",
       "      <td>1.115733e+06</td>\n",
       "      <td>3529f52a-3c09-46fc-944d-b3c619af7cd7</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>x</td>\n",
       "      <td>25.3000</td>\n",
       "      <td>101.20</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>-1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>2019-01-14 00:00:00</td>\n",
       "      <td>000001</td>\n",
       "      <td>10.11</td>\n",
       "      <td>-6000</td>\n",
       "      <td>1.176317e+06</td>\n",
       "      <td>650c29d4-459c-412a-8000-c881af3c662a</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>x</td>\n",
       "      <td>15.1650</td>\n",
       "      <td>60.66</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>-1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>2019-01-14 00:00:00</td>\n",
       "      <td>000002</td>\n",
       "      <td>25.02</td>\n",
       "      <td>1000</td>\n",
       "      <td>1.151291e+06</td>\n",
       "      <td>9d0b7e50-53ac-42df-9175-c3f303387629</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>x</td>\n",
       "      <td>6.2550</td>\n",
       "      <td>0.00</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>2019-01-15 00:00:00</td>\n",
       "      <td>000001</td>\n",
       "      <td>10.24</td>\n",
       "      <td>1000</td>\n",
       "      <td>1.141046e+06</td>\n",
       "      <td>80ac049d-602e-44ff-a799-3be84acdfe55</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>x</td>\n",
       "      <td>5.0000</td>\n",
       "      <td>0.00</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>2019-01-15 00:00:00</td>\n",
       "      <td>000002</td>\n",
       "      <td>25.16</td>\n",
       "      <td>-5000</td>\n",
       "      <td>1.266688e+06</td>\n",
       "      <td>e354ff47-4298-4d5a-a22e-794e327dee61</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>x</td>\n",
       "      <td>31.4500</td>\n",
       "      <td>125.80</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>-1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>2019-01-16 00:00:00</td>\n",
       "      <td>000001</td>\n",
       "      <td>10.48</td>\n",
       "      <td>-7000</td>\n",
       "      <td>1.339957e+06</td>\n",
       "      <td>4977e6e3-e6ee-4d8c-8c43-9b1f027e07b1</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>x</td>\n",
       "      <td>18.3400</td>\n",
       "      <td>73.36</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>-1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21</th>\n",
       "      <td>2019-01-16 00:00:00</td>\n",
       "      <td>000002</td>\n",
       "      <td>25.42</td>\n",
       "      <td>1000</td>\n",
       "      <td>1.314530e+06</td>\n",
       "      <td>16d8792c-b2f0-400d-b2a6-aa5c2e473728</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>x</td>\n",
       "      <td>6.3550</td>\n",
       "      <td>0.00</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22</th>\n",
       "      <td>2019-01-17 00:00:00</td>\n",
       "      <td>000001</td>\n",
       "      <td>10.25</td>\n",
       "      <td>-7000</td>\n",
       "      <td>1.386191e+06</td>\n",
       "      <td>eff96ddf-6dbb-4af3-a7bd-1f170e632dbc</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>x</td>\n",
       "      <td>17.9375</td>\n",
       "      <td>71.75</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>-1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>23</th>\n",
       "      <td>2019-01-17 00:00:00</td>\n",
       "      <td>000002</td>\n",
       "      <td>24.97</td>\n",
       "      <td>1000</td>\n",
       "      <td>1.361214e+06</td>\n",
       "      <td>7b21c653-d1d1-44d8-9772-790585915ae4</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>x</td>\n",
       "      <td>6.2425</td>\n",
       "      <td>0.00</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24</th>\n",
       "      <td>2019-01-18 00:00:00</td>\n",
       "      <td>000001</td>\n",
       "      <td>10.43</td>\n",
       "      <td>1000</td>\n",
       "      <td>1.350779e+06</td>\n",
       "      <td>dfe8fbac-ff27-4746-a53a-f6220f3c63a6</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>x</td>\n",
       "      <td>5.0000</td>\n",
       "      <td>0.00</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25</th>\n",
       "      <td>2019-01-18 00:00:00</td>\n",
       "      <td>000002</td>\n",
       "      <td>25.76</td>\n",
       "      <td>1000</td>\n",
       "      <td>1.325013e+06</td>\n",
       "      <td>98e05d3a-cdf5-4cac-bd41-fa747e29a2a4</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>x</td>\n",
       "      <td>6.4400</td>\n",
       "      <td>0.00</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>26</th>\n",
       "      <td>2019-01-21 00:00:00</td>\n",
       "      <td>000001</td>\n",
       "      <td>10.34</td>\n",
       "      <td>-8000</td>\n",
       "      <td>1.407630e+06</td>\n",
       "      <td>23cd8f74-342a-4796-aeeb-07441bed75e1</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>x</td>\n",
       "      <td>20.6800</td>\n",
       "      <td>82.72</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>-1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27</th>\n",
       "      <td>2019-01-21 00:00:00</td>\n",
       "      <td>000002</td>\n",
       "      <td>25.65</td>\n",
       "      <td>-8000</td>\n",
       "      <td>1.612573e+06</td>\n",
       "      <td>3f7dad60-3de4-4ca9-ba5e-af87d33594e6</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>x</td>\n",
       "      <td>51.3000</td>\n",
       "      <td>205.20</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>-1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>28</th>\n",
       "      <td>2019-01-22 00:00:00</td>\n",
       "      <td>000001</td>\n",
       "      <td>10.28</td>\n",
       "      <td>-8000</td>\n",
       "      <td>1.694710e+06</td>\n",
       "      <td>f2b9cae9-b1d9-4a00-ba62-ce81baec3d72</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>x</td>\n",
       "      <td>20.5600</td>\n",
       "      <td>82.24</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>-1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>29</th>\n",
       "      <td>2019-01-22 00:00:00</td>\n",
       "      <td>000002</td>\n",
       "      <td>25.40</td>\n",
       "      <td>-8000</td>\n",
       "      <td>1.897656e+06</td>\n",
       "      <td>de5fce65-5a39-42c6-8d6e-914060c5f971</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>x</td>\n",
       "      <td>50.8000</td>\n",
       "      <td>203.20</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>-1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>30</th>\n",
       "      <td>2019-01-23 00:00:00</td>\n",
       "      <td>000001</td>\n",
       "      <td>10.35</td>\n",
       "      <td>-8000</td>\n",
       "      <td>1.980353e+06</td>\n",
       "      <td>3d763d03-c042-4312-a7e3-ffae8fb877b4</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>x</td>\n",
       "      <td>20.7000</td>\n",
       "      <td>82.80</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>-1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>31</th>\n",
       "      <td>2019-01-23 00:00:00</td>\n",
       "      <td>000002</td>\n",
       "      <td>25.31</td>\n",
       "      <td>1000</td>\n",
       "      <td>1.955036e+06</td>\n",
       "      <td>d41375b6-70c1-4b71-9eab-0ae5f1763fd2</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>x</td>\n",
       "      <td>6.3275</td>\n",
       "      <td>0.00</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32</th>\n",
       "      <td>2019-01-24 00:00:00</td>\n",
       "      <td>000001</td>\n",
       "      <td>10.52</td>\n",
       "      <td>-8000</td>\n",
       "      <td>2.039091e+06</td>\n",
       "      <td>3fc5cbfd-354e-4f68-9248-a0853a763435</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>x</td>\n",
       "      <td>21.0400</td>\n",
       "      <td>84.16</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>-1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>33</th>\n",
       "      <td>2019-01-24 00:00:00</td>\n",
       "      <td>000002</td>\n",
       "      <td>25.41</td>\n",
       "      <td>-9000</td>\n",
       "      <td>2.267495e+06</td>\n",
       "      <td>2b065a3c-e510-4f64-ab30-c94a93a0dc51</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>x</td>\n",
       "      <td>57.1725</td>\n",
       "      <td>228.69</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>-1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>34</th>\n",
       "      <td>2019-01-25 00:00:00</td>\n",
       "      <td>000001</td>\n",
       "      <td>11.00</td>\n",
       "      <td>1000</td>\n",
       "      <td>2.256490e+06</td>\n",
       "      <td>3c140a72-da07-443f-9386-04440fecb9a4</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>x</td>\n",
       "      <td>5.0000</td>\n",
       "      <td>0.00</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>35</th>\n",
       "      <td>2019-01-25 00:00:00</td>\n",
       "      <td>000002</td>\n",
       "      <td>26.10</td>\n",
       "      <td>1000</td>\n",
       "      <td>2.230384e+06</td>\n",
       "      <td>0002bf5f-e6ec-433b-b8bd-841e76c93483</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>x</td>\n",
       "      <td>6.5250</td>\n",
       "      <td>0.00</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>36</th>\n",
       "      <td>2019-01-28 00:00:00</td>\n",
       "      <td>000001</td>\n",
       "      <td>10.94</td>\n",
       "      <td>-9000</td>\n",
       "      <td>2.328721e+06</td>\n",
       "      <td>306a25f0-fc21-4eee-b0bb-9d5a0a57694d</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>x</td>\n",
       "      <td>24.6150</td>\n",
       "      <td>98.46</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>-1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>37</th>\n",
       "      <td>2019-01-28 00:00:00</td>\n",
       "      <td>000002</td>\n",
       "      <td>26.06</td>\n",
       "      <td>1000</td>\n",
       "      <td>2.302654e+06</td>\n",
       "      <td>a4d75c37-d330-4400-9298-f19665f0043e</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>x</td>\n",
       "      <td>6.5150</td>\n",
       "      <td>0.00</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38</th>\n",
       "      <td>2019-01-29 00:00:00</td>\n",
       "      <td>000001</td>\n",
       "      <td>11.00</td>\n",
       "      <td>1000</td>\n",
       "      <td>2.291649e+06</td>\n",
       "      <td>4ea50c6e-dc9a-4372-a9a5-86ce216c2199</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>x</td>\n",
       "      <td>5.0000</td>\n",
       "      <td>0.00</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>39</th>\n",
       "      <td>2019-01-29 00:00:00</td>\n",
       "      <td>000002</td>\n",
       "      <td>26.88</td>\n",
       "      <td>-11000</td>\n",
       "      <td>2.586960e+06</td>\n",
       "      <td>9ca9217d-a510-4344-8def-9be6e67ab42f</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>x</td>\n",
       "      <td>73.9200</td>\n",
       "      <td>295.68</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>-1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>40</th>\n",
       "      <td>2019-01-30 00:00:00</td>\n",
       "      <td>000001</td>\n",
       "      <td>10.95</td>\n",
       "      <td>-10000</td>\n",
       "      <td>2.696323e+06</td>\n",
       "      <td>a577bff0-f7d2-4b60-a31c-bcee0cf7dc8f</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>x</td>\n",
       "      <td>27.3750</td>\n",
       "      <td>109.50</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>-1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>41</th>\n",
       "      <td>2019-01-30 00:00:00</td>\n",
       "      <td>000002</td>\n",
       "      <td>27.21</td>\n",
       "      <td>1000</td>\n",
       "      <td>2.669106e+06</td>\n",
       "      <td>b0a91950-bcc3-4a3e-89d2-eaf5258d4c0c</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>x</td>\n",
       "      <td>6.8025</td>\n",
       "      <td>0.00</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>42</th>\n",
       "      <td>2019-01-31 00:00:00</td>\n",
       "      <td>000001</td>\n",
       "      <td>11.10</td>\n",
       "      <td>1000</td>\n",
       "      <td>2.658001e+06</td>\n",
       "      <td>da320f16-b546-4972-891d-5ce1fc4e1ac7</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>x</td>\n",
       "      <td>5.0000</td>\n",
       "      <td>0.00</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>43</th>\n",
       "      <td>2019-01-31 00:00:00</td>\n",
       "      <td>000002</td>\n",
       "      <td>27.75</td>\n",
       "      <td>1000</td>\n",
       "      <td>2.630244e+06</td>\n",
       "      <td>3c7c4429-8fae-4684-b917-c99f1c6a2ba4</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>x</td>\n",
       "      <td>6.9375</td>\n",
       "      <td>0.00</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>44</th>\n",
       "      <td>2019-02-01 00:00:00</td>\n",
       "      <td>000001</td>\n",
       "      <td>11.20</td>\n",
       "      <td>1000</td>\n",
       "      <td>2.619039e+06</td>\n",
       "      <td>6bd6d067-1afd-4337-ac1e-a312bb67b83c</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>x</td>\n",
       "      <td>5.0000</td>\n",
       "      <td>0.00</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>45</th>\n",
       "      <td>2019-02-01 00:00:00</td>\n",
       "      <td>000002</td>\n",
       "      <td>27.68</td>\n",
       "      <td>1000</td>\n",
       "      <td>2.591352e+06</td>\n",
       "      <td>8da82eda-4b0c-4a00-a362-e397de44295b</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>x</td>\n",
       "      <td>6.9200</td>\n",
       "      <td>0.00</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "               datetime    code  price  amount          cash  \\\n",
       "0   2019-01-02 00:00:00  000001   9.19    1000  9.908050e+05   \n",
       "1   2019-01-02 00:00:00  000002  23.90    1000  9.668990e+05   \n",
       "2   2019-01-03 00:00:00  000001   9.28    1000  9.576140e+05   \n",
       "3   2019-01-03 00:00:00  000002  24.07   -1000  9.816539e+05   \n",
       "4   2019-01-04 00:00:00  000001   9.75   -2000  1.001129e+06   \n",
       "5   2019-01-04 00:00:00  000002  24.93    1000  9.761932e+05   \n",
       "6   2019-01-07 00:00:00  000001   9.74    1000  9.664482e+05   \n",
       "7   2019-01-07 00:00:00  000002  25.05   -2000  1.016486e+06   \n",
       "8   2019-01-08 00:00:00  000001   9.66   -3000  1.045429e+06   \n",
       "9   2019-01-08 00:00:00  000002  25.00   -2000  1.095367e+06   \n",
       "10  2019-01-09 00:00:00  000001   9.94    1000  1.085422e+06   \n",
       "11  2019-01-09 00:00:00  000002  25.33    1000  1.060086e+06   \n",
       "12  2019-01-10 00:00:00  000001  10.10    1000  1.049981e+06   \n",
       "13  2019-01-10 00:00:00  000002  25.11    1000  1.024864e+06   \n",
       "14  2019-01-11 00:00:00  000001  10.20    1000  1.014659e+06   \n",
       "15  2019-01-11 00:00:00  000002  25.30   -4000  1.115733e+06   \n",
       "16  2019-01-14 00:00:00  000001  10.11   -6000  1.176317e+06   \n",
       "17  2019-01-14 00:00:00  000002  25.02    1000  1.151291e+06   \n",
       "18  2019-01-15 00:00:00  000001  10.24    1000  1.141046e+06   \n",
       "19  2019-01-15 00:00:00  000002  25.16   -5000  1.266688e+06   \n",
       "20  2019-01-16 00:00:00  000001  10.48   -7000  1.339957e+06   \n",
       "21  2019-01-16 00:00:00  000002  25.42    1000  1.314530e+06   \n",
       "22  2019-01-17 00:00:00  000001  10.25   -7000  1.386191e+06   \n",
       "23  2019-01-17 00:00:00  000002  24.97    1000  1.361214e+06   \n",
       "24  2019-01-18 00:00:00  000001  10.43    1000  1.350779e+06   \n",
       "25  2019-01-18 00:00:00  000002  25.76    1000  1.325013e+06   \n",
       "26  2019-01-21 00:00:00  000001  10.34   -8000  1.407630e+06   \n",
       "27  2019-01-21 00:00:00  000002  25.65   -8000  1.612573e+06   \n",
       "28  2019-01-22 00:00:00  000001  10.28   -8000  1.694710e+06   \n",
       "29  2019-01-22 00:00:00  000002  25.40   -8000  1.897656e+06   \n",
       "30  2019-01-23 00:00:00  000001  10.35   -8000  1.980353e+06   \n",
       "31  2019-01-23 00:00:00  000002  25.31    1000  1.955036e+06   \n",
       "32  2019-01-24 00:00:00  000001  10.52   -8000  2.039091e+06   \n",
       "33  2019-01-24 00:00:00  000002  25.41   -9000  2.267495e+06   \n",
       "34  2019-01-25 00:00:00  000001  11.00    1000  2.256490e+06   \n",
       "35  2019-01-25 00:00:00  000002  26.10    1000  2.230384e+06   \n",
       "36  2019-01-28 00:00:00  000001  10.94   -9000  2.328721e+06   \n",
       "37  2019-01-28 00:00:00  000002  26.06    1000  2.302654e+06   \n",
       "38  2019-01-29 00:00:00  000001  11.00    1000  2.291649e+06   \n",
       "39  2019-01-29 00:00:00  000002  26.88  -11000  2.586960e+06   \n",
       "40  2019-01-30 00:00:00  000001  10.95  -10000  2.696323e+06   \n",
       "41  2019-01-30 00:00:00  000002  27.21    1000  2.669106e+06   \n",
       "42  2019-01-31 00:00:00  000001  11.10    1000  2.658001e+06   \n",
       "43  2019-01-31 00:00:00  000002  27.75    1000  2.630244e+06   \n",
       "44  2019-02-01 00:00:00  000001  11.20    1000  2.619039e+06   \n",
       "45  2019-02-01 00:00:00  000002  27.68    1000  2.591352e+06   \n",
       "\n",
       "                                order_id realorder_id trade_id account_cookie  \\\n",
       "0   e23f9e01-e8d2-4a05-93ef-9163ce7a83ee         None     None              x   \n",
       "1   1f430faa-86d1-440b-abf7-a7feddc17954         None     None              x   \n",
       "2   0230d608-91cc-422e-8deb-218f4faef3d7         None     None              x   \n",
       "3   427f1eed-b3bd-4078-94e3-156bf3ae21a6         None     None              x   \n",
       "4   48fd88b8-e3c0-4df5-94ef-62b936345bd9         None     None              x   \n",
       "5   d9aff179-9bc3-4268-b2d5-37eee8de309f         None     None              x   \n",
       "6   41f23955-b920-4f04-bcb7-ca1cd960aa45         None     None              x   \n",
       "7   cb2fdd74-7326-41d9-812f-9d88da447741         None     None              x   \n",
       "8   8ef82ee7-87b8-4f7d-8a01-374f52b60cbb         None     None              x   \n",
       "9   1f63fa52-f56b-4814-8eb3-5e4de849f3cb         None     None              x   \n",
       "10  13e77d45-9e2c-4ef3-89f5-7fa63cc3b808         None     None              x   \n",
       "11  7e714c35-83a4-4cb4-8ab5-d4fb2b31ccb7         None     None              x   \n",
       "12  380f932e-7871-4c72-94d3-5077861c9f53         None     None              x   \n",
       "13  3966e418-9017-4565-b24f-ed9455ef5593         None     None              x   \n",
       "14  99048106-f032-45a2-92c6-5a076f899a8a         None     None              x   \n",
       "15  3529f52a-3c09-46fc-944d-b3c619af7cd7         None     None              x   \n",
       "16  650c29d4-459c-412a-8000-c881af3c662a         None     None              x   \n",
       "17  9d0b7e50-53ac-42df-9175-c3f303387629         None     None              x   \n",
       "18  80ac049d-602e-44ff-a799-3be84acdfe55         None     None              x   \n",
       "19  e354ff47-4298-4d5a-a22e-794e327dee61         None     None              x   \n",
       "20  4977e6e3-e6ee-4d8c-8c43-9b1f027e07b1         None     None              x   \n",
       "21  16d8792c-b2f0-400d-b2a6-aa5c2e473728         None     None              x   \n",
       "22  eff96ddf-6dbb-4af3-a7bd-1f170e632dbc         None     None              x   \n",
       "23  7b21c653-d1d1-44d8-9772-790585915ae4         None     None              x   \n",
       "24  dfe8fbac-ff27-4746-a53a-f6220f3c63a6         None     None              x   \n",
       "25  98e05d3a-cdf5-4cac-bd41-fa747e29a2a4         None     None              x   \n",
       "26  23cd8f74-342a-4796-aeeb-07441bed75e1         None     None              x   \n",
       "27  3f7dad60-3de4-4ca9-ba5e-af87d33594e6         None     None              x   \n",
       "28  f2b9cae9-b1d9-4a00-ba62-ce81baec3d72         None     None              x   \n",
       "29  de5fce65-5a39-42c6-8d6e-914060c5f971         None     None              x   \n",
       "30  3d763d03-c042-4312-a7e3-ffae8fb877b4         None     None              x   \n",
       "31  d41375b6-70c1-4b71-9eab-0ae5f1763fd2         None     None              x   \n",
       "32  3fc5cbfd-354e-4f68-9248-a0853a763435         None     None              x   \n",
       "33  2b065a3c-e510-4f64-ab30-c94a93a0dc51         None     None              x   \n",
       "34  3c140a72-da07-443f-9386-04440fecb9a4         None     None              x   \n",
       "35  0002bf5f-e6ec-433b-b8bd-841e76c93483         None     None              x   \n",
       "36  306a25f0-fc21-4eee-b0bb-9d5a0a57694d         None     None              x   \n",
       "37  a4d75c37-d330-4400-9298-f19665f0043e         None     None              x   \n",
       "38  4ea50c6e-dc9a-4372-a9a5-86ce216c2199         None     None              x   \n",
       "39  9ca9217d-a510-4344-8def-9be6e67ab42f         None     None              x   \n",
       "40  a577bff0-f7d2-4b60-a31c-bcee0cf7dc8f         None     None              x   \n",
       "41  b0a91950-bcc3-4a3e-89d2-eaf5258d4c0c         None     None              x   \n",
       "42  da320f16-b546-4972-891d-5ce1fc4e1ac7         None     None              x   \n",
       "43  3c7c4429-8fae-4684-b917-c99f1c6a2ba4         None     None              x   \n",
       "44  6bd6d067-1afd-4337-ac1e-a312bb67b83c         None     None              x   \n",
       "45  8da82eda-4b0c-4a00-a362-e397de44295b         None     None              x   \n",
       "\n",
       "    commission     tax message  frozen  direction  total_frozen  \n",
       "0       5.0000    0.00    None       0          1             0  \n",
       "1       5.9750    0.00    None       0          1             0  \n",
       "2       5.0000    0.00    None       0          1             0  \n",
       "3       6.0175   24.07    None       0         -1             0  \n",
       "4       5.0000   19.50    None       0         -1             0  \n",
       "5       6.2325    0.00    None       0          1             0  \n",
       "6       5.0000    0.00    None       0          1             0  \n",
       "7      12.5250   50.10    None       0         -1             0  \n",
       "8       7.2450   28.98    None       0         -1             0  \n",
       "9      12.5000   50.00    None       0         -1             0  \n",
       "10      5.0000    0.00    None       0          1             0  \n",
       "11      6.3325    0.00    None       0          1             0  \n",
       "12      5.0000    0.00    None       0          1             0  \n",
       "13      6.2775    0.00    None       0          1             0  \n",
       "14      5.0000    0.00    None       0          1             0  \n",
       "15     25.3000  101.20    None       0         -1             0  \n",
       "16     15.1650   60.66    None       0         -1             0  \n",
       "17      6.2550    0.00    None       0          1             0  \n",
       "18      5.0000    0.00    None       0          1             0  \n",
       "19     31.4500  125.80    None       0         -1             0  \n",
       "20     18.3400   73.36    None       0         -1             0  \n",
       "21      6.3550    0.00    None       0          1             0  \n",
       "22     17.9375   71.75    None       0         -1             0  \n",
       "23      6.2425    0.00    None       0          1             0  \n",
       "24      5.0000    0.00    None       0          1             0  \n",
       "25      6.4400    0.00    None       0          1             0  \n",
       "26     20.6800   82.72    None       0         -1             0  \n",
       "27     51.3000  205.20    None       0         -1             0  \n",
       "28     20.5600   82.24    None       0         -1             0  \n",
       "29     50.8000  203.20    None       0         -1             0  \n",
       "30     20.7000   82.80    None       0         -1             0  \n",
       "31      6.3275    0.00    None       0          1             0  \n",
       "32     21.0400   84.16    None       0         -1             0  \n",
       "33     57.1725  228.69    None       0         -1             0  \n",
       "34      5.0000    0.00    None       0          1             0  \n",
       "35      6.5250    0.00    None       0          1             0  \n",
       "36     24.6150   98.46    None       0         -1             0  \n",
       "37      6.5150    0.00    None       0          1             0  \n",
       "38      5.0000    0.00    None       0          1             0  \n",
       "39     73.9200  295.68    None       0         -1             0  \n",
       "40     27.3750  109.50    None       0         -1             0  \n",
       "41      6.8025    0.00    None       0          1             0  \n",
       "42      5.0000    0.00    None       0          1             0  \n",
       "43      6.9375    0.00    None       0          1             0  \n",
       "44      5.0000    0.00    None       0          1             0  \n",
       "45      6.9200    0.00    None       0          1             0  "
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "s.acc.history_table"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
